单条件单字段模糊查找:ide
select id, name from BASE_SECURITY_DEPARTMENT where parent_id = '1' and name LIKE'客运处';
包括:LIKE
不包括:NOT LIKEcode
多条件单字段模糊查找(包含)it
select id, name from BASE_SECURITY_DEPARTMENT where parent_id = '1' and REGEXP_LIKE(name, '(客运处|货运处|运输处)$');
and REGEXP_LIKE(字段名, '(匹配串1|匹配串2|...)')--//全模糊匹配
and REGEXP_LIKE(字段名, '^(匹配串1|匹配串2|...)')--//右模糊匹配
and REGEXP_LIKE(字段名, '(匹配串1|匹配串2|...)$')--//左模糊匹配
包括:REGEXP_LIKE
不包括:NOT REGEXP_LIKEclass
多条件单字段进准查找(等于)select
select id, name from BASE_SECURITY_DEPARTMENT where parent_id = '1' and name in (客运处,货运处,运输处);
等于:IN
不等于: NOT INdi