联系:手机/微信(+86 17813235971) QQ(107644445)
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
找出数据库中所有表表中REMARK列中含有WN、wind、wlr中表名和数量
declare i number:=0; begin for c1 in (select table_name from user_tab_columns where column_name='REMARK') loop EXECUTE IMMEDIATE 'select count(*) from '|| c1.table_name ||' where UPPER(REMARK) LIKE ''%WN%'' or UPPER(remark) like ''%WIND%'' or UPPER(remark) like ''%WLR%''' into i; if i>0 then dbms_output.put_line(c1.table_name||'------'||i); end if; end loop; end;