本文主要是介绍云计算(dept表结构),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
dept表结构 | |||||||
字段名 | 字段说明 | 数据类型 | 主键 | 外键 | 非空 | 唯一 | 自增 |
d_no | 部门编号 | INT(11) | 是 | 否 | 是 | 是 | 是 |
d_name | 部门名称 | VARCHAR(50) | 否 | 否 | 是 | 否 | 否 |
d_location | 部门地址 | VARCHAR(100) | 否 | 否 | 否 | 否 | 否 |
创建表
Dept表添加数据
dept表中的记录 | ||
d_no | d_name | d_location |
10 | ACCOUNTING | ShangHai |
20 | RESEARCH | BeiJing |
30 | SALES | ShenZhen |
40 | OPERATIONS | FuJian |
employee表中的记录 | ||||||
e_no | e_name | e_gender | dept_no | e_job | e_salary | hireDate |
1001 | SMITH | m | 20 | CLERK | 800 | 2002/9/12 |
1002 | ALLEN | f | 30 | SALESMAN | 1600 | 2003/5/12 |
1003 | WARD | f | 30 | SALESMAN | 1250 | 2003/5/12 |
1004 | JONES | m | 20 | MANAGER | 2975 | 1998/5/18 |
1005 | MARTIN | m | 30 | SALESMAN | 1250 | 2001/6/12 |
1006 | BLAKE | f | 30 | MANAGER | 2850 | 1997/2/15 |
1007 | CLARK | m | 10 | MANAGER | 2450 | 2002/9/12 |
1008 | SCOTT | m | 20 | ANALYSE | 3000 | 2003/5/12 |
1009 | KING | f | 10 | PRESIDENT | 5000 | 1995/1/1 |
1010 | TURNER | f | 30 | SALESMAN | 1500 | 1995/1/2 |
1011 | ADAMS | m | 20 | CLERK | 1100 | 1995/1/3 |
1012 | JAMES | f | 30 | CLERK | 950 | 1995/1/4 |
mysql> insert into employee values(1001,"SMITH","m",20,"CLERK",800,"2002/9/12"), (1002,"ALLEN","f",30,"SALESMAN",1600,"2003/5/12"), (1003,"WARD","f",30,"SALESMAN",1250,"2003/5/12"), (1004,"JONES","m",20,"MANAGER",2975,"1998/5/18"), (1005,"MARTIN","m",30,"SALESMAN",1250,"2001/6/12"), (1006,"BLAKE","f",30,"MANAGER",2850,"1997/2/15"), (1007,"CLARK","m",10,"MANAGER",2450,"2002/9/12"), (1008,"SCOTT","m",20,"ANALYSE",3000,"2003/5/12"), (1009,"KING","f",10,"PRESIDENT",5000,"1995/1/1"), (1010,"TURNER","f",30,"SALESMAN",1500,"1995/1/2"), (1011,"ADAMS","m",20,"CLERK",1100,"1995/1/3"), (1012,"JAMES","f",30,"CLERK",950,"1995/1/4");
MySQL 创建表实验报告
employee表结构 | |||||||
字段名 | 字段说明 | 数据类型 | 主键 | 外键 | 非空 | 唯一 | 自增 |
e_no | 员工编号 | INT(11) | 否 | 否 | 是 | 是 | 否 |
e_name | 员工姓名 | VARCHAR(50) | 否 | 否 | 是 | 否 | 否 |
e_gender | 员工性别 | CHAR(2) | 否 | 否 | 否 | 否 | 否 |
dept_no | 部门编号 | INT(11) | 否 | 是 | 是 | 否 | 否 |
e_job | 职位 | varchar(50) | 否 | 否 | 是 | 否 | 否 |
e_salary | 薪水 | INT(11) | 否 | 否 | 是 | 否 | 否 |
hireDate | 入职日期 | DATE | 否 | 否 | 是 | 否 | 否 |
这篇关于云计算(dept表结构)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!