把xx替换成具体字符,如“深圳”,sql语句如下:
select * from user_source t where instr(lower(t.text),'xx')>0;
select * from all_source t where t.owner<>'SYS' and instr(t.text,'××')>0;
查找注释中包含的特定字符
select * from user_col_comments t where t.comments like '%美%'
如果是sql server数据库,可以使用如下语句:
select * from sysobjects where id in(
select id from syscomments where text like '%××%')
示例:
SELECT instr('syranmo','s') FROM dual; -- 返回 1
SELECT instr('syranmo','ra') FROM dual; -- 返回 3
1 SELECT instr('syran mo','a',1,2) FROM dual; -- 返回 0
java高级群2群:134787504