管理员: 启动服务器 net start mysql80
cd 进入 mysql -u root -p
输入密码:123456
创建数据库 create database dbname
删除数据库 drop database dbname
创建数据表 create table tname()
修改数据表 alter table tname()
删除数据表
drop table tname(删除整个数据表)
delete table tname(删除一行数据)
tracate table tname(删除表里面的数据)
常规查询
查询所有的字段
select * from student
条件查询
等于 =
select * from student where name="li"
不等于 <>
select * from student where name<>"li"
大于>
select * from student where age>'10'
between..........and......
select * from student where age between 10 and 60
首位姓li 查询 like
select * from student where name like "li%"
末位是阳 查询 like
select * from student where name like "%阳"
关键字查询 like
select * from student where name like"%成%"
升序 order by asc
select * from student order by score asc
降序 order by desc
select * from student order by score desc
多键值查询
select * from student age in ('10' , '50')
limit子句:限制结果的数量,limit偏移量记录的条数
select * from student limit 0,3;