2024-10-30 09:22:30
1、创建测试表,
create table test_users(name varchar2(20), zw varchar2(20), zc varchar2(20));
2、插入测试数据
insert into test_users values('王XX','校长','');
insert into test_users values('陈XX','','院长');
insert into test_users values('张XX','','教授');
insert into test_users values('李XX','主任','');
insert into test_users values('吴XX','','处长');
insert into test_users values('段XX','','副教授');
commit;
3、查询表中全量数据,select t.*, rowid from test_users t;
4、编写语句,查询职称和职称中不含院长、校长、主任、处长的所有记录;
select t.* from test_users t where not regexp_like(zw||zc,'院长|校长|主任|处长');
2024-10-30 10:42:59
2024-10-30 09:15:41
2024-10-30 08:47:38
2024-10-30 08:40:32