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
 General SQL Server Forums
 New to SQL Server Programming
 stored procedures

Author  Topic 

zaidqis
Yak Posting Veteran

63 Posts

Posted - 2006-05-30 : 10:01:43
Hi
this two example of stored procedures

CREATE PROCEDURE usp_InsertGroup
(
@GroupID UNIQUEIDENTIFIER,
@GroupName VARCHAR(50),
@GroupDescription TEXT
)
AS
INSERT INTO Groups
(GroupID, GroupName, GroupDescription, LastUpdateDate)
VALUES(@GroupID, @GroupName, @GroupDescription, GETDATE())


---------------------------------------------------------------------

CREATE PROCEDURE usp_SelectGroup
(
@GroupID UNIQUEIDENTIFIER
)
AS
SELECT GroupID, GroupName, GroupDescription, LastUpdateDate
FROM Groups
WHERE GroupID = @GroupID


my question
is in the first example they put comma after UNIQUEIDENTIFIER
@GroupID UNIQUEIDENTIFIER,

and in the second example they didnot put comma after UNIQUEIDENTIFIER
@GroupID UNIQUEIDENTIFIER

what is the criterion of put comma (,) after parameter data type ??

Thank you

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-05-30 : 10:09:47
1 It is followed by @GroupName
2 It is not followed by any other parameter

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

zaidqis
Yak Posting Veteran

63 Posts

Posted - 2006-05-30 : 10:37:18
thank you for answer me
i get it
Go to Top of Page
   

- Advertisement -