select * from itemRecandd_table where (supplement not like '%苏%' and repandter not like '%苏%'and tapeID not like '%苏%'and tapeType not like '%苏%' and firstplayColumn not like '%苏%'and columnName not like '%苏%') and (DateDiff(day,shootTime,getdate())<60000) andder by shootTime desc
可以用 sql 内置函数判断,没有必要用 likeselect * from itemRecandd_table where (instr(supplement,'苏' = 0) and ..... and (DateDiff(day,shootTime,getdate())<60000) andder by shootTime desc
你的写法是对的,有一点问题就是 not 前要加字段名 select * from itemRecord_table where supplement not (supplement like '%苏%' or reporter like '%苏%'or tapeID like '%苏%'or tapeType like '%苏%' or firstplayColumn like '%苏%'or columnName like '%苏%') and (DateDiff(day,shootTime,getdate())<60000) order by shootTime desc
select * from itemRecord_table where supplement not (supplement like '%苏%' or reporter like '%苏%'or tapeID like '%苏%'or tapeType like '%苏%' or firstplayColumn like '%苏%'or columnName like '%苏%') and (DateDiff(day,shootTime,getdate())<60000) order by shootTime desc