我必须生成一个 sql 查询,它从两个表中检索两列。
在 where 子句中,id 是1,2,3,4 and 5
。
如何形成具有上述指定条件的单个查询。
我只需要 sql 查询而不需要游标或函数概念。
例如;
select column 1, column2 from table1, table2 where id=1
select column 1, column2 from table1, table2 where id=2
select column 1, column2 from table1, table2 where id=3
select column 1, column2 from table1, table2 where id=4
如何将这些多个查询变成一个查询???
提前致谢。