我想对不同输入的列表执行不同的查询。 例如:
Lets say different inputs are, name = 'abc1','abc2','abc3'
要执行的查询是:
1)some large sql query taking input as 'abc1'
2)another large sql query taking input as 'abc1'
对所有输入都要重复,即abc2,abc3 ...... “
答案 0 :(得分:0)
你可以把所有的查询都放在工会中。
select * from table1 where name='abc1' union
select * from table2 where name='abc2' union
select * from table3 where name='abc3' union
select * from table4 where name='abc4' union
select * from table5 where name='abc5'