victory的博客

长安一片月,万户捣衣声

0%

MySQL | MySQL常见的表操作语句

MySQL常见的表操作语句

1.表的创建

create table table_name(
id int auto_increment primary key not null,
name varchar(11) not null
);

2.增加记录

insert into table_name values()
insert into table_name values(),(),()
insert into table_name() values()
insert into table_name() values(),(),()

3.修改记录

update table_name set attr=val where...

4.删除记录

delete from table_name where...

5.表查询

条件:select * from table_name where...
聚合:select count(*)|min()|max()|avg() from table_name
分组:select gender,count(*) from table_name group by gender having....
排序:select * from table_name order by...
分页:select * from table_name limit start,count

连接查询:点击此处,查看更多关于连接查询!!!