猿问

请问用SQL查询出表table1与表table2中class字段值相等的数据?

高手们帮忙做下 还有几道我不会的
表:table1(id,class,score),用SQL列出各班成绩最高的列表,显示class,score两个字段
答:select class,max(score) from table1 group by fclass,fid

2、用SQL,插入表 table1(id,class,score) 一条数据 值为(001,01,90)
答:insert into score1 () values('001','01',90)

3、用SQL,修改表 table1(id,class,score) 中 score字段值为100
答:alter table s-t add 'score' varchar(200) default ('100')

4、table1(id,class,score),table2(id,class,sg) 用SQL查询出表table1与表table2中class字段值相等的数据

5、用SQL,删除表table1中数据,但保留表结构
答:TRUNCATE TABLE table1
exec sp_MSforeachtable @command1="Delete from table1"
Linux系统,在使用ls命令时,只显示/tmp目录信息,应使用参数 _ls -a /tmp__ 。

杨魅力
浏览 309回答 1
1回答

蝴蝶不菲

1、答:select class,max(score) from table1 group by fclass2、insert into score1(id,class,score) values('001','01',90)3、update table1 set score=1004、select * from table1 a, table2 b where a.class = b.class5、delete from table1 或者 truncate table table1
随时随地看视频慕课网APP
我要回答