生成开发环境中,发现通过not like 's_%' 出来的结果是不正确的。会过滤掉例如"spcn_xxxx"等的数据。如下
and tt.TABLE_NAME not like 's_%'
and TABLE_NAME = 'spcn_undeal'
会查不到spcn_undeal这个表的数据。
解决方案:
通过position来实现startWith的功能。如下:
and position('s_' IN tt.TABLE_NAME) != 1)