單條件單字段模糊查找: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