1.查询语句:
select “栏目名” from “表名”
select * from A
去重distinct语句:
select distinct name from A
条件查询:Where and or
select * from A Where score >60 and score<80
查询相同字段不同值:in(不连续)
select * from A Where name in(“Leo”,“Xua”)
between(连续)
select * from A Where score between “70” and “90”
模糊查询:Like
select * from A Where name like “王%”
“A_Z”(ABZ),“A%”,“%A”,“%A%”;
排序:order by (des,asc)默认asc;
select * from A order by age desc
函数:avg,count,max,min,sum
select 函数(栏目) from A
网友评论