1、创建表

create table xxx (id int primary key not null auto_increment,name varchar(20));

红色为字段属性

2、查看表格属性

dessc 表名;

3、查看表格内容

select * from 表名;

4、查看创建的表格语法格式

show create table 表名;

5、删除表

drop table  表名

6、为表格增加字段(加一个属性)

alter table 表名 add birhday datetime;

其中birthday为表格的属性,datetime为birthday的类型

7、将birthday更改为birth

alter table 表名 change birthday birth datetime;

8、将datetime 更改为date

alter table 表名 modify birth date;

9、删除表格的某一属性

alter table 表名 drop birth;

10、查看表属性以及创建表格

数据库中表格管理

11、在空表格添加信息

数据库中表格管理

数据库中表格管理

数据库中表格管理

12、更改表格信息

update students set gender=2 where id=3;

数据库中表格管理

 

13、删除表格信息

delete from students where id=2;

数据库中表格管理

 

 

                       数据库中表格管理

相关文章:

  • 2021-10-06
  • 2021-11-21
  • 2021-11-21
  • 2021-09-08
  • 2022-01-01
  • 2021-10-28
  • 2022-12-23
  • 2021-11-16
猜你喜欢
  • 2021-11-27
  • 2021-10-28
  • 2021-10-17
  • 2021-10-06
  • 2021-09-15
  • 2021-11-29
相关资源
相似解决方案