10-创建练习sql语句的两个表

创建两表

create table dept( deptno int,dname string,loc string) row format delimited fields terminated by " "; 


create table emp(empno int,ename string,job string,mgr int,hiredate date,sal int,comm int,deptno int) row format delimited fields terminated by " ";


7369 刘一 职员 7902 1980-12-17 800 null 20
7499 陈二 推销员 7698 1981-02-20 1600 300 30
7521 张三 推销员 7698 1981-02-22 1250 500 30
7566 李四 经理 7839 1981-04-02 2975 null 20
7654 王五 推销员 7698 1981-09-28 1250 1400 30
7698 赵六 经理 7839 1981-05-01 2850 null 30
7782 孙七 经理 7839 1981-06-09 2450 null 10
7788 周八 分析师 7566 1987-06-13 3000 null 20
7839 吴九 总裁 null 1981-11-17 5000 null 10
7844 郑十 推销员 7698 1981-09-08 1500 0 30
7876 郭十一 职员 7788 1987-06-13 1100 null 20

10 财务部 北京
20 研发部 上海
30 销售部 广州
40 行政部 深圳

 

原文地址:https://www.cnblogs.com/JBLi/p/10830346.html