创建表
CREATE TABLE Vehicle_Info(
Vehicle_Code int NOT NULL,
Dept_Code varchar(50) NOT NULL,
License_Plate varchar(10) NOT NULL,
Dept_Type varchar(50) NOT NULL,
Dept_load varchar(50),
Manufactor varchar2(50),
Status varchar2(50),
Alarm_Info varchar2(100),
Vehicle_Type varchar2(50),
CRT_DT date,
CRT_USR varchar2(10),
MDY_DT date,
MDY_USR varchar2(10)
)
创建序列
Create sequence VEHICLE_CODE
Increment by 1
Start with 1
Maxvalue 999999
Minvalue 1
Nocycle
nocache;
创建触发器
CREATE OR REPLACE TRIGGER VEHICLE_TRI
AFTER INSERT ON Vehicle_Info
FOR EACH ROW
BEGIN
END VEHICLE_TRI;
测试INSERT INTO VEHICLE_INFO (DEPT_CODE,LICENSE_PLATE,DEPT_TYPE)
VALUES('1','1','1')