查询语句:
select 字段 from 表名 where 条件
select 字段 from 表名 where 字段 like '%值%'
select distinct 字段 from 表名
//排序查询
select 字段 from 表名 where 条件 ORDER BY 字段;
//设置升序降序(ASC,DESC)(升序,降序)
select 字段 from 表名 where 条件 ORDER BY 字段 ASC|DESC
//多项排序
select 字段 from 表名 where 条件 ORDER BY 字段 ASC|DESC,字段ASC|DESC
//关联多表查询
select * from Appointnents
join Customers on Appointnents.Customerld=Customers.id
where Customers.Id=1;
//找出最大值,AVG\SUM\COUNT (平均值、总和、计数)
select max(字段) from 表名
修改语句:
update 表名 set 字段=‘值’ where 条件
删除语句:
delete from 表名 where 条件
增加语句:
insert into 表名 (字段) values ('值')