创建表语句
DECLARE num NUMBER;
BEGIN
SELECT COUNT(*) INTO num FROM user_tables WHERE table_name=UPPER('EXAMARRANGEEMPLOYEE');
IF num = 0 THEN
EXECUTE IMMEDIATE
'
create table EXAMARRANGEEMPLOYEE
(
ID NVARCHAR2(36) not null,
ARRANGEID NVARCHAR2(36) not null,
PERSONID NVARCHAR2(36) not null
)';
END IF;
END;
/
-- Add comments to the columns
comment on column EXAMARRANGEEMPLOYEE.ID
is '考评安排人员ID';
comment on column EXAMARRANGEEMPLOYEE.ARRANGEID
is '考评安排ID';
comment on column EXAMARRANGEEMPLOYEE.PERSONID
is '人员ID';
执行更新语句时,最后要COMMIT才能生效
delete from exampubliccodeitem where typeid=1;
insert into exampubliccodeitem(typeid,itemid,itemvalue,available,isreserve,indexcode)
values(1,'1_1','单选题',1,1,1);
insert into exampubliccodeitem(typeid,itemid,itemvalue,available,isreserve,indexcode)
values(1,'1_2','多选题',1,1,2);
insert into exampubliccodeitem(typeid,itemid,itemvalue,available,isreserve,indexcode)
values(1,'1_3','判断题',1,1,3);
COMMIT;