i have two table like
emp_detail
emp_contact
m using stored procedure to get the output
create procedure pro
as
begin
select * from emp_detail
select * from emp_contact
end
is this correct or any other way in sql server
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Sep 12, 2013, 4:22 AM
yes this is correct way to fetch mutiple query result in single store procedure.
Please refer
https://sites.google.com/site/mrmbookmarks/msg/C---Get-multiple-result-sets-from-one-SqlCommand-query-or-stored-procedure
hope this will help you.
Suthish NairPosted Sep 13, 2013, 6:26 AM
Sanjeeb LenkaPosted Sep 12, 2013, 12:27 AM
yes you can do it . As your table names both the tables having data of emp so you can retrieve the data in a single result set using joins. it would be better to use joins to get the data.