MySQL-- 创建表格
2021/10/12 2:14:33
本文主要是介绍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;
这篇关于MySQL-- 创建表格的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-16MySQL资料:新手入门教程
- 2024-11-15MySQL教程:初学者必备的MySQL数据库入门指南
- 2024-11-15MySQL教程:初学者必看的MySQL入门指南
- 2024-11-04部署MySQL集群项目实战:新手入门教程
- 2024-11-04如何部署MySQL集群资料:新手入门指南
- 2024-11-02MySQL集群项目实战:新手入门指南
- 2024-11-02初学者指南:部署MySQL集群资料
- 2024-11-01部署MySQL集群教程:新手入门指南
- 2024-11-01如何部署MySQL集群:新手入门教程