CREATE TABLE S --建表
(
Sno INT primary key, --学号(设为主键)
Sname CHAR(6) , --姓名
Sadd CHAR(20), --籍贯
Smath INT ) --数学成绩
1)insert into students (number,name,sex,nation,adress,birth,class) values ('200511622209','王林','男','汉','苏州','1986-1-1','班级1052');
insert into students(number,name,sex,nation,adress,birth,class) values ('200511622210','李玉','女','汉','深圳','1987-5-1','班级1052');
2)select courseNo,courseName,courseScore from course;
3)select name,DateDiff(birth,today())/365 from students where name like '何_';
4)select Snumber,Sname,Cscore from students S,sorce C where Cname='网页制作';
5)select S from scorce C left join student S on Cnumber=Snumber where sum(Csorce)=60;
6)select C from scorce C,students S where Sname="王五" or Sname="李六";
7)select from students order by number asc birth desc;
8)select sum(id) from studnets group by address;
9)select from source limit 1
10)update studnets set name="张星" where number='20051162203';
11)update students set name=(select name from student where name !=NUll)
12)update scorce set score=(select max(scorce) from score where name='网页制作') whre number=(select name from students where name='陈七');
13)delete from students where number='200511622210';
以上就是关于sql数据库考试:建一个表:学号 姓名 籍贯 数学(成绩) 求创建该表的sql语句,在线等,速度啊。。。全部的内容,包括:sql数据库考试:建一个表:学号 姓名 籍贯 数学(成绩) 求创建该表的sql语句,在线等,速度啊。。。、数据库!谢谢大家、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)