Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Stored Precedure

Author  Topic 

chriztoph
Posting Yak Master

184 Posts

Posted - 2012-05-28 : 00:23:50
Hi Everyone,

Just a question in this code:

ALTER PROC prcTest
AS
BEGIN
.......
END
GO

ALTER PROC prcTest;1
AS
BEGIN
.......
END

ALTER PROC prcTest;2
AS
BEGIN
.......
END
GO
GO



what is the meaning of the numbers at the end of the stored proc's name?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-05-28 : 00:29:45
please do refer to the Books OnLine
http://msdn.microsoft.com/en-us/library/ms187926.aspx
quote:
--Transact-SQL Stored Procedure Syntax
CREATE { PROC | PROCEDURE } [schema_name.] procedure_name [ ; number ]
[ { @parameter [ type_schema_name. ] data_type }
[ VARYING ] [ = default ] [ OUT | OUTPUT ] [READONLY]
] [ ,...n ]
[ WITH <procedure_option> [ ,...n ] ]
[ FOR REPLICATION ]
AS { [ BEGIN ] sql_statement [;] [ ...n ] [ END ] }
[;]

<procedure_option> ::=
[ ENCRYPTION ]
[ RECOMPILE ]
[ EXECUTE AS Clause ]



quote:
; number

An optional integer that is used to group procedures of the same name. These grouped procedures can be dropped together by using one DROP PROCEDURE statement.
Note Note

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

chriztoph
Posting Yak Master

184 Posts

Posted - 2012-05-28 : 00:38:08
Thanks khtan..
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-05-28 : 00:42:09
welcome


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-28 : 02:25:27
Hope you paid attention to last sentence

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

chriztoph
Posting Yak Master

184 Posts

Posted - 2012-05-28 : 05:17:22
@visakh16,

yup, that's what I need to do, modify my stored proc and avoid using it.

Thanks guys..
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-28 : 13:50:16
ok...cool then

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -