'使用"in" 搜尋
select * from xxx where 欄位1 in('xx1','xx2','xx3'.......)
取代了
select * from xxx where 欄位1='xx1' or 欄位1='xx2'........
更好用的是可以配合使用次查詢
select * from xxx where 欄位1 in(select 欄位1 from xxx2 where.....)
arrow
arrow
    全站熱搜

    colud77 發表在 痞客邦 留言(0) 人氣()