4
Reply

How to return Data from 4 Different tables in Stored Procedure with out using joins?

vemareddy induri

vemareddy induri

10y
2.7k
0
Reply

    Union , Union all

    For selecting columns without join just do like this.Select table1.FieldName,table2.FieldName from table1,table2.Or if you want to take only common fields from different tables without joins do like this.select table1.fieldname, table2.fieldname from table1, table2 where table1.commonfiledname = table2.commonfieldname

    if you want to get single value from each table like sum or count of a column then you can do this like- select ( (select count(*) from table 1) A, (select count(*) from table 2) B, (select count(*) from table 3)C, (select count(*) from table 4) D ) It will give the Single row with 4 columns named A,B,C and D

    you can return multiple values from stored procedure, eg. http://www.aspdotnet-suresh.com/2012/07/create-stored-procedure-to-return.html And, May I ask you why not using Joins?