范文无忧网面试笔试笔试回答

SQL试题 200分!

04月26日 编辑 fanwen51.com

[SQL疑难笔试题]1.select max(infoID)+1-min(infoID)-count(infoID) from Info 2. declare id int, select id=min(infoID) from Info declare ckid int declare ID_cursor cursor for sele...+阅读

SQL试题 200分!

1. select s.sname,sc.scgrade from s,sc where s.sno=sc.sno and

2.select s.sname from s,c,sc where s.sno=sc.sno and c.cno= sc.cno and

3.select sum(sc.scgrade)/count(sc.scgrade),s.sname from s,sc where s.sno=sc.sno group by s.sname

4.select s.sname,sc.cno from s ,sc where s.sno=sc.sno and sc.scgrade<60 group by s.sname,sc.cno having count(sc.cno)>=2

5.select s.sname from(select s.sname from sc,s where sc.sno=s.sno and sc.cno='1' and sc.cno='2' )

sql简单试题懂得来

问题一:

Create table 运动员(

运动员编号 char(6) ___not null_____ primary key ____,

姓名 varchar(40),

性别 char(2)____constraint chk1 _ check(性别='男' or 性别='女')________,

年龄 char(2),

队名 char(20),

__constraint chk2__ check(队名('A队'B队'C队'D队))_______;

)

(我不知道最后那些算不算是空格,是的话,你可以追问....)

问题二:

(1) 统计参加比赛时女运动员的人数。

Select _count(运动员编号) as 参赛女运动员_

From 运动员

Where 性别=‘女’;

(2) 查询100576号运动员参加的所有项目名称及其比赛的时间和地点。

Select 项目编号,项目名,比赛时间,比赛场地

From ___项目 a ,参赛 b__

Where _____a.项目编号=b.项目编号________

And _______b.运动员编号='100576'______;

如有疑问请追问....

问题一中的check约束名,chk1标准命名的话应该是chkSex。chk2应该写成chkTeam。。这样看起来让人比较一目了然.......

SQL题目谁帮忙做一下明天考试急用!

(1)create table sc (sno not null,cno not null,grade)

(2)select * from student where sname like '司马%'(3)create view PC_view WITH ENCRYPTION AS select * from student shere (4)grant alter,insert on student to U1

(5)select sname ,sno from student s,course c,sc a where a.sno=s.sno and c.cno=a.cno and c.cname='数据库原理及应用' order by s.sno desc...

SQL Server试题解答

create database 订货管理 create table 仓库( S_id int primary key, S_city char(10), S_square int ) create table 职工( W_id int primary key, W_name char(10), W_sex char(2), S_id int, S_Salary int ) create table 供应商( P_id int primary key, P_name char(40), P_address char(50), ) create table 订货单 ( O_id int primary key, W_id int, P_id int, O_date DATETIME )

延伸阅读:

某公司SQL试题寻找答案第一道题是查看学生的姓名,选修的课程和对应的学分吧 select '姓名'=(select name from students_t where id=student_course_t.student_id ), '选修课程'=(select name from cou...

sql server笔试题求答案急!!!这套笔试题你想拿上100分,也该悬赏上100分。 输上基本上都有答案,看看SQL2005的书 create database STU --创建数据库 use login1 go create table STUDENT --建表 ( SNO char...

SQL数据库试题求解------------------------------------------------------ create table students(st_id varchar(20),st_name varchar(50),sex varchar(10)) insert into students(st_id,s...

SQL SERVER2005数据库考试题create table T1 ( c1 VARCHAR2(6) not null, c2 VARCHAR2(6) not null, c3 VARCHAR2(6) not null, c4 VARCHAR2(6) not null, c5 VARCHAR2(6) not null) add constraint T1...

SQL Server试题解答create database 订货管理 create table 仓库( S_id int primary key, S_city char(10), S_square int ) create table 职工( W_id int primary key, W_name char(10), W_sex...

SQL题解试题如下解1:select * from tbName where id_no in(select id_no from tbName group by id_no having count(id_no)>1) 解2:select * into #tmpTb from tbName where id_no in(select...

急求sql server试题答案简答题急急急(1)什么叫实体完整性? 实体完整性指表中行的完整性。要求表中的所有行都有唯一的标识符,称为主关键字。主关键字是否可以修改,或整个列是否可以被删除,取决于主关键字与其他表之...

sql简单试题懂得来问题一: Create table 运动员( 运动员编号 char(6) ___not null_____ primary key ____, 姓名 varchar(40), 性别 char(2)____constraint chk1 _ check(性别='男' or 性别='女'...

SQL试题求解1 IF OBJECT_ID('学生表')IS NOT NULL DROP TABLE 学生表 GO create table 学生表 --建立学生表. ( 学号 int not null , --学号,姓名,年龄,性别,家庭住址,联系电话 姓名 varchar(10)...

推荐阅读
图文推荐
栏目列表