oracle官方示例数据库-面试常用
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for dept -- ---------------------------- DROP TABLE IF EXISTS `dept`; CREATE TABLE `dept` ( `deptno` int(0) NOT NULL COMMENT '部门编号', `dname` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部门名称', `loc` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址', `memo` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明', PRIMARY KEY (`deptno`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of dept -- ---------------------------- INSERT INTO `dept` VALUES (10, 'ACCOUNTING', 'NEW YORK', '会计部'); INSERT INTO `dept` VALUES (20, 'RESEARCH', 'DALLAS', '研究部'); INSERT INTO `dept` VALUES (30, 'SALES', 'CHICAGO', '销售部'); INSERT INTO `dept` VALUES (40, 'OPERATIONS', 'BOSTON', '业务部'); -- ---------------------------- -- Table structure for emp -- ---------------------------- DROP TABLE IF EXISTS `emp`; CREATE TABLE `emp` ( `empno` int(0) NOT NULL COMMENT '员工编号', `cname` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '员工中文姓名', `ename` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '员工英文姓名', `job` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作岗位', `mgr` int(0) NULL DEFAULT NULL COMMENT '上级领导', `hiredate` date NULL DEFAULT NULL COMMENT '入职日期', `sal` decimal(10, 2) NULL DEFAULT NULL COMMENT '薪水', `comm` decimal(10, 2) NULL DEFAULT NULL COMMENT '津贴', `deptno` int(0) NULL DEFAULT NULL COMMENT '部门编号-外键', `memo` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明', PRIMARY KEY (`empno`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Records of emp -- ---------------------------- INSERT INTO `emp` VALUES (7369, '黄风', 'SMITH', 'CLERK', 7902, '1980-12-17', 2800.00, NULL, 20, '办事员'); INSERT INTO `emp` VALUES (7499, '卢帆新', 'ALLEN', 'SALESMAN', 7698, '1981-02-20', 1600.00, 300.00, 30, '销售员'); INSERT INTO `emp` VALUES (7521, '语琴', 'WARD', 'SALESMAN', 7698, '1981-02-22', 1250.00, 500.00, 30, NULL); INSERT INTO `emp` VALUES (7566, '郭俊', 'JONES', 'MANAGER', 7839, '1981-04-02', 2975.00, NULL, 20, '经理'); INSERT INTO `emp` VALUES (7654, '曼文', 'MARTIN', 'SALESMAN', 7698, '1981-09-28', 1250.00, 1400.00, 30, NULL); INSERT INTO `emp` VALUES (7698, '赵羽', 'BLAKE', 'MANAGER', 7839, '1981-05-01', 2850.00, 800.00, 30, NULL); INSERT INTO `emp` VALUES (7782, '李四', 'CLARK', 'MANAGER', 7839, '1981-06-09', 2450.00, NULL, 10, NULL); INSERT INTO `emp` VALUES (7788, '古驰', 'SCOTT', 'ANALYST', 7566, '1987-03-13', 3000.00, 1000.00, 20, '分析师'); INSERT INTO `emp` VALUES (7839, '李邦', 'KING', 'PRESIDENT', 7839, '1981-11-17', 5000.00, 1000.00, 10, '主席'); INSERT INTO `emp` VALUES (7844, '尤辉', 'TURNER', 'SALESMAN', 7698, '1981-09-08', 1500.00, 0.00, 30, NULL); INSERT INTO `emp` VALUES (7876, '妙彤', 'ADAMS', 'CLERK', 7788, '1987-03-13', 1100.00, NULL, 20, NULL); INSERT INTO `emp` VALUES (7900, '张三', 'JAMES', 'CLERK', 7698, '1981-12-03', 950.00, NULL, 30, NULL); INSERT INTO `emp` VALUES (7902, '张三丰', 'FORD', 'ANALYST', 7566, '1981-12-03', 3000.00, 500.00, 20, NULL); INSERT INTO `emp` VALUES (7934, '李四娘', 'MILLER', 'CLERK', 7782, '1982-01-23', 1300.00, NULL, 10, NULL); SET FOREIGN_KEY_CHECKS = 1;
本文来自博客园,作者:xiaoyongdata(微信号:xiaoyongdata),转载请注明原文链接:https://www.cnblogs.com/xiaoyongdata/p/16412532.html