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 2000 Forums
 SQL Server Development (2000)
 Select in stored procedures

Author  Topic 

iminore
Posting Yak Master

141 Posts

Posted - 2007-07-27 : 06:53:55
A statement, in a stored procedure, such as 'select col from T' will return 'col' to the calling program. Is this true of a statement such as 'select @col = col from T'?
Any reference to BOL would be appreciated.

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-07-27 : 07:38:30
your second example will put a single value into a variable.
then you have to do
select @col to return that value.

look in BOL under variables

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2007-07-27 : 08:13:45
Thanks for that. I realise the second statement puts the value into the variable. I can't find anywhere in BOL that says it doesn't return the value to the calling program.
Go to Top of Page
   

- Advertisement -