数据库
首页 > 数据库> > MySQL-- 创建表格

MySQL-- 创建表格

作者:互联网

创建下图的表格
在这里插入图片描述
在这里插入图片描述

use company;
drop table t_employee;
create table t_employee(
     empno int,
     ename varchar(20),
     job varchar(40),
     MGR int,
     Hiredate date,
     sal double(10,2),
     comm double(10,2),
     deptno int
);
insert into t_employee values
	(7369,'smith','clerk',7902,19810312,800.00,null,20),
	(7499,'allen','salesman',7698,19820312,1600.00,300,30),
	(7521,'ward','salesman',7698,19830312,1250.00,500,30),
	(7566,'jones','manager',7839,19810312,2975.00,null,20),
	(7654,'martin','salesman',7698,19810312,1250.00,1400,30),
	(7698,'blake','manager',7839,19810312,2850.00,null,30),
	(7782,'clark','manager',7839,19850312,2450.00,null,10),
	(7788,'scott','analyst',7566,19810312,3000.00,null,20),
	(7839,'king','president',null,19810312,5000.00,null,10),
	(7844,'turner','salesman',7698,19890312,1500.00,0.00,30),
	(7876,'adams','clerk',7788,19980312,1100.00,null,20),
	(7900,'james','clerk',7698,19970312,950.00,null,30),
	(7902,'ford','analyst',7566,00000000,3000.00,null,20),
	(7934,'miller','clerk',7782,19810312,1300.00,null,10);


查看表结构
desc t_employee;

在这里插入图片描述

查看表内容
select * from t_employee;
在这里插入图片描述

标签:创建表格,20,--,30,19810312,MySQL,employee,null,7698
来源: https://blog.csdn.net/gezongbo/article/details/120712462