sql语句怎么写
sql语句怎么写
请教一条sql语句怎么写,我想实现类别newclass为1或2或3,都行,但必须同时满足yw=‘1’
SELECT top 20 * FROM news where newsclass='1' or newsclass='2' or newsclass='3' and yw='1' ORDER BY newsid desc
我这样写的,不对,正确的怎么写?
类型都为varchar
SELECT top 20 * FROM news where newsclass='1' or newsclass='2' or newsclass='3' and yw='1' ORDER BY newsid desc
我这样写的,不对,正确的怎么写?