永发信息网

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

答案:2  悬赏:40  手机版
解决时间 2021-02-03 04:14
  • 提问者网友:心牵心
  • 2021-02-03 01:01
高手们帮忙做下 还有几道我不会的
表: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__ 。
最佳答案
  • 五星知识达人网友:英雄的欲望
  • 2021-02-03 01:13
1、答:select class,max(score) from table1 group by fclass
2、insert into score1(id,class,score) values('001','01',90)
3、update table1 set score=100
4、select * from table1 a, table2 b where a.class = b.class
5、delete from table1 或者 truncate table table1
全部回答
  • 1楼网友:琴狂剑也妄
  • 2021-02-03 01:31
搜一下:table1(id,class,score),table2(id,class,sg) 用SQL查询出表table1与表table2中class字段值相等的数据
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯