SELECT TOP
100 *
FROM
RZ_PB_ChargesBillOrder
WHERE
1 = 1
AND AuthNo = '20000405'
AND (FsDataStatus = 1 OR ZzsDataStatus = 1 OR WlkDataStatus = 1)
如果数据库里 写脚本你and 和or 都用到了,
注意了 :
错误写法 where Id= 1 and Name=' 柳正 ' or isDelete =1 这样是错误的。
正确写法: where Id= 1 and (Name=' 柳正 ' or isDelete =1 or Phone='123456')
and 匹配多个or 需要把or 括起来