MySQL对数据表的基本操作语句
2017-09-14 21:40
615 查看
数据表的创建
查看数据库中所有的表
查看表的结构
向表中添加内容
修改表的名字
删除表
create table user( id int not null auto_increment, username varchar(20) not null, gender char(1) not null default 'M', primary key(id) );
查看数据库中所有的表
show tables;
查看表的结构
describe table_name; or desc table_name;
向表中添加内容
insert into user(id,username,gender) values(1,'xiaoD','M');
修改表的名字
alert table table_name rename table_new_name;
删除表
drop table table_name;
相关文章推荐
- MySql数据基本操作sql语句
- MySQL 基本操作--DML:数据操作语句(insert、delete、update)
- MySQL 基本操作--DDL:数据定义语句(建表、更改表结构等等)
- MySQL基础教程15 —— SQL语法之数据操作语句DML——DELETE语法
- MySQL(一) 数据表数据库的基本操作
- SQL SERVER 数据表基本操作语句
- mysql-数据表的基本操作1
- MySQL(1)-对表及数据的基本操作
- MySql修改数据表的基本操作(DDL操作)
- MySQL基本操作语句小结
- 基本SQL 语句操作数据增删查改
- SQL学习(2)基本数据操作语句
- SqlServer 与 MySQL 基本操作语句对比
- 【MySQL】MySQL 的基本操作语句
- mysql自学,数据库基本操作语句_查询_插入_更新
- MySQL_基本操作语句
- MySql应用的基本操作语句
- mysql 基本语法学习1(数据库、数据表、数据列的操作)
- Python学习第2节(基本数据类型操作和执行流程语句)
- MySQL数据表基本操作