时间:2021-07-01 10:21:17 帮助过:13人阅读
select * from ppp where num <=all (select num from ppp)
select top 1 num from ppp order by num
select * from ppp where num =(select Min(num) from ppp)
2、复制表(只复制结构,源表A,新表B)
select * into B from A where 1=0
3、建立一张临时表
create table #Temp(字段1 类型,字段2 类型···)
4、用来连接字符串的符号是+
5、姓张:like ‘张%‘;
“_”表示任一字符;
6、按成绩降序排列,若成绩相同则按学号升序排列
order by grade DESC, xh ASC
7、查询总人数
select count(*) from student
8、统计平均分超过80的学生,列出学号和平均成绩
select xh,AVG(grade)
from sc
group by xh
having avg(grade)>=80
数据库与SQL语言
标签:order 传递依赖 控制 span count rom 语言 字符 符号