现在用sql语句查出来字段里包含某个字符串的所有记录怎么查

2025-05-11 22:47:57
推荐回答(1个)
回答1:

select * from table where instr(col1,str2)<>0
oracle是instr 返回str2在str1的起始位置,如果没有就返回0
不知道你是什么数据库,如果实现不行就
select * from table where col1 not like '%str2%'