select * from T where operator = (case when @type = 0 then @o1 else is not null end) 主要是想根據(jù)@type 用不同的條件當(dāng)@type = 0 時(shí) operator = @o 否則 operator is not null 請(qǐng)問各位大俠SQL語句怎么寫,最好不要用字符串拼接
sql語句怎么實(shí)現(xiàn)動(dòng)態(tài)條件
MMTTMM
2018-07-24 10:13:12