墙 墙头草 Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-02 #1 有表1的结构为 a b c 1 2 3 2 3 3 2 4 5 23 7 2 23 8 7 我想把表1中b字段为2,3,4的列出来用sql怎样写多谢:)
P panjf Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-02 #2 select * from 表1 where (b=2)or(b=3)or(b=4)
T twos Unregistered / Unconfirmed GUEST, unregistred user! 2002-08-02 #3 如果支持In,可以这样写 select * from table1 where (b in ('2','3','4')) 如果不支持,可以 select * from table1 where b='2' or b='3' or b='4'
如果支持In,可以这样写 select * from table1 where (b in ('2','3','4')) 如果不支持,可以 select * from table1 where b='2' or b='3' or b='4'