Bootstrap

Oracle数据库中自带的所有表结构

一、tb_emp(员工表)

1、建表

CREATE TABLE "TEST"."TB_EMP" (	
	"EMPNO" NUMBER(4,0) PRIMARY KEY NOT NULL, 
	"ENAME" VARCHAR2(10), 
	"JOB" VARCHAR2(9), 
	"MGR" NUMBER(4,0), 
	"HIREDATE" DATE, 
	"SAL" NUMBER(7,2), 
	"COMM" NUMBER(7,2), 
	"DEPTNO" NUMBER(2,0)
);
COMMENT ON COLUMN "TEST"."TB_EMP"."EMPNO" IS '员工编号';
COMMENT ON COLUMN "TEST"."TB_EMP"."ENAME" IS '姓名';
COMMENT ON COLUMN "TEST"."TB_EMP"."JOB" IS '职位';
COMMENT ON COLUMN "TEST"."TB_EMP"."MGR" IS '领导编号';
COMMENT ON COLUMN "TEST"."TB_EMP"."HIREDATE" IS '入职时间';
COMMENT ON COLUMN "TEST"."TB_EMP"."SAL" IS '基本工资';
COMMENT ON COLUMN "TEST"."TB_EMP"."COMM" IS '奖金';
COMMENT ON COLUMN "TEST"."TB_EMP"."DEPTNO" IS '部门编号';
COMMENT ON TABLE "TEST"."TB_EMP"  IS '员工表';

2、导入数据

INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7369,'史密斯','店员',7902,TIMESTAMP '1980-12-17 00:00:00.000000',800,NULL,20);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7499,'艾伦','售货员',7698,TIMESTAMP '1981-02-20 00:00:00.000000',1600,300,30);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7521,'沃德','售货员',7698,TIMESTAMP '1981-02-22 00:00:00.000000',1250,500,30);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7566,'琼斯','经理',7839,TIMESTAMP '1981-04-02 00:00:00.000000',2975,NULL,20);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7654,'马丁','售货员',7698,TIMESTAMP '1981-09-28 00:00:00.000000',1250,1400,30);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7698,'布莱克','经理',7839,TIMESTAMP '1981-05-01 00:00:00.000000',2850,NULL,30);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7782,'克拉克','经理',7839,TIMESTAMP '1981-06-09 00:00:00.000000',2450,NULL,10);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) VALUES (7788,'斯科特','分析师',7566,TIMESTAMP '1987-04-19 00:00:00.000000',3000,NULL,20);
INSERT INTO "TB_EMP" (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPT
;