.net - Best Approach To Handle Multiple Select Statements In A Single Trip To The Database -
this question has answer here:
i thinking transaction me in following example wrong. attempting avoid making 3 different calls database if dont have in following scenerio..
i want following:
- select name, address employee
- select state states
- select error errortable
in case have call several different selects data. best way approach scenerio return data want read minimizing several calls database?
note: no tables have relationship between them.
if there no relation between tables kind of
select [your selected columns] (select * table1 [conditon table1]) t1 inner join (select * table2 [condition table2]) t2 on 1=1 inner join (select * table3 [condition table3]) t3 on 1=1
this makes 1 trip database.
Comments
Post a Comment