mysql or in union all 使用方法

or的用法

select * from bt where bt.ID =98 or bt.ID = 1222 or bt.ID = 8903;

in 的用法

select * from bt where bt.ID in (98 ,1222 ,8903);

union all 的用法

select * from bt where bt.ID=98 
union all 
select * from bt where bt.ID=1222 
union all 
select * from bt where bt.ID=8903;

 

posted @ 2018-06-22 10:25  流星小子  阅读(162)  评论(0编辑  收藏  举报