需求,匹配字段project_name以2或者3结尾的数据
方法一
1、模糊匹配出符合要求的值
?select?* from gse_test_project B?
? where project_name like '%3' or project_name like '%2'
?2、不符合模糊匹配的值? ?
?select?* from gse_test_project B?
? where not(project_name like '%3' or project_name like '%2') or?project_name is null
方法二
1、模糊匹配出符合要求的值
?select?* from gse_test_project B?
? where project_name like any(array['%3','%2'])
?? ??? ??? ??? ??? ??? ??
?2、不符合模糊匹配的值? ????? ?
? ? ? ? ? ? ? ? ? ? ??
? ? ? ? (1)select?* from gse_test_project B?
? ? ? where project_name not like all(array['%3','%2'])?or?project_name is null
?? ??? ?(2)select? * from gse_test_project B?
? ? ? ? ? ? ? ? where not(project_name like any(array['%3','%2'])) or?project_name is null