请教sql数据库答案 基础的我忘了 我想知道答案进行 *** 作 谢谢!! | 您所在的位置:网站首页 › 广州市留学生落户 › 请教sql数据库答案 基础的我忘了 我想知道答案进行 *** 作 谢谢!! |
不好意思 寝室要断电了 只能写这么多 / 创建student表 / create table student ( SNo int, --学号 SN char(10), --姓名 SA int, --年龄 ) / 创建Course表 / create table Course ( Cno int, --课程号 CN char(20), --课程名 CT char(10), --任课教师名 ) /2 根据题1的学生关系模式,用SQL有关语句/ --1插入任意三个学生的完整信息 insert into student(SNo,SN,SA) values(001,'张一',19) insert into student(SNo,SN,SA) values(002,'张二',20) insert into student(SNo,SN,SA) values(003,'张三',21) --2修改所有学生的年龄 update student set SA = SA+1 /表示当前年龄SA+1/ where SNo=001 update student set SA = SA+1 where SNo=002 update student set SA = SA+1 where SNo=003 ---1) 创建一张学生表,包含以下信息,学号,姓名,年龄,性别,家庭住址,联系电话 CREATE TABLE student ( [id] [int] IDENTITY(1,1) NOT NULL, [student_id] [nvarchar](50) NULL, [studen_name] [nvarchar](50) NULL, [age] [int] NULL , [sex] [nvarchar](5) NULL, [address] [nvarchar](200) NULL, [tel] [nvarchar](20) NULL ) --2) 修改学生表的结构,添加一列信息,学历 education alter table student add education nvarchar(10) NULL --3) 修改学生表的结构,删除一列信息,家庭住址 alter table student drop column address --5) 修改学生表的数据,将电话号码以11开头的学员的学历改为“大专” update student set education='大专' where tel like '11%' --6) 删除学生表的数据,姓名以C开头,性别为‘男’的记录删除 delete student where studen_name like 'C%' and sex='男' --7) 查询学生表的数据,将所有年龄小于22岁的,学历为“大专”的,学生的姓名和学号示出来 select studen_name,student_id from student where age60语句的功能是__b____。 A、从S表中彻底删除年龄大于60岁的记录 B、S表中年龄大于60岁的记录被加上删除标记 C、删除S表 D、删除S表的年龄列 1 2 以上就是关于请教sql数据库答案 基础的我忘了 我想知道答案进行 *** 作 谢谢!!全部的内容,包括:请教sql数据库答案 基础的我忘了 我想知道答案进行 *** 作 谢谢!!、sql数据库一道试题帮忙做做、求高手解答SQL数据库题目等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力! 欢迎分享,转载请注明来源:内存溢出 原文地址:https://outofmemory.cn/sjk/9544827.html |
CopyRight 2018-2019 实验室设备网 版权所有 |