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.
| Author |
Topic |
|
krishnet
Starting Member
29 Posts |
Posted - 2007-06-05 : 05:38:58
|
| Hi, Using SQLSERVER 2005 I want to return the value in the stored procedure. How can i return the value in the stored procedure ? SELECTFROM dbo.accountWHERE accountid = @accountid--select @@RETURNVALUE = @accountidI want that by default the value of @accountid should return the value...............What i want is don't want to use WHERE accountid = 2but the 2 returns itself..Is it possible ??I have read that::You can also return the values from stored procedure using output variables.Stored procedure doesnot returns value where as function returns value." if u call procedure inside storedprocedure then u can return multipal values"..Thanxs |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-06-05 : 05:41:29
|
Not clear what you want.May be this:SELECT @accountid as AccountID or define @accountid as OUTPUT parameter.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-05 : 09:24:45
|
| Read about output parameter in sql server help fileAlso, if you use input paramter you need to supply it's value when executingMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|