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)
 how to return two tables from stored procedure

Author  Topic 

Avdhut
Starting Member

11 Posts

Posted - 2011-06-07 : 12:32:21
how can i return two sql tables from a stored procedure in sql server 2008 and use it

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-07 : 13:00:49
create procedure mysp
as
select * from table1
select * from table2
go

exec mysp

SUspect that's not what you want though.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2011-06-14 : 04:40:42
Note that it is not possible to extract a particular resultset until you use a front end application like VB6, .NET etc

Madhivanan

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

- Advertisement -