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

SQL题目初学者需要高手给答案

03月12日 编辑 fanwen51.com

[求数据库SQl笔试答案]建立学生表Studentuse mastercreate table student (Sno int,Sname varchar(10),Ssex varchar(2)Sage int,Sdept varchar(10)) 为Student表建立索引create unique clustered...+阅读

SQL题目初学者需要高手给答案

update card set+cardno where and len(cardno)=12select top 5 cusinfo.cusid,cusinfo.name,sum(jyinfo.money),sum(jyinfo.sxf) from jyinfo left join cusinfo on jyinfo.cusid=cusinfo.cusidwhere jyinfo.way=1 and datediff(month,jyinfo.date,'1998-3-1')=0group by cusinfo.cusid,cusinfo.nameorder by sum(jyinfo.money) desc大概应该是这样子...

SQL数据库题目解答

2.select sno,sname,major from student where major in(select cno from course where) 3.没有见到有选课表 4.select cname from course where cno not in(select distinct major from student)

5.USE master GO CREATE DATABASE Stu --创建数据库 GO USE Stu GO CREATE TABLE student (sno char(10) PRIMARY KEY, sname nvarchar(20) NOT NULL, sex char(2) default '男', major nvarchar(20), birthday date) CREATE TABLE course (cno char(10) PRIMARY KEY, cname nvarchar(20) NOT NULL, credit nvarchar(20)) CREATE TABLE sc (sno char(10), cno char(10), grade decimal(3,1), CONSTRAINT [PK_sc] PRIMARY KEY CLUSTERED ([sno] ASC,[cno] ASC), CONSTRAINT [FK_sc_student] FOREIGN KEY([sno])REFERENCES [dbo].[student] ([sno]), CONSTRAINT [FK_sc_course] FOREIGN KEY([cno])REFERENCES [dbo].[course] ([cno]) )

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

select infoID from Info

open ID_cursor

fetch from ID_cursor into ckid

while fetch_status=0

begin

if(ckid=id)

begin

id=id+1

fetch from ID_cursor into ckid

end

else

begin

print '丢失记录为'+convert(nvarchar(20),id)

return

end

end

select id=min(infoID) from Info

print ''丢失记录为'+convert(nvarchar(20),id)'

延伸阅读:

某公司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我使用的是MySQL 如下语句: 建表语句: create table Lessoninfo( no int, week int, isonduty char); 插入数据:略 insert into Lessoninfo values(...............) SQL查询语...

SQL面试题求答案指定学科查询: select Name from Student where Curricula ='指定学科' and mark >60 不指定学科,按照学科排序 select Curricula,Name from Student where mark >60 order by...

关于sql题目11,select name ,sex from table where name like '张%' 12, select name from table where name like '' 13,select name ,sex from table where age>20 14,select name fr...

一份SQL题急求答案!!1可以用筛选或者排名函数啊~ 参数 check_expression 将被检查是否为 NULL的表达式。check_expression 可以是任何类型的。 replacement_value 在 check_expression 为 NULL时...

速求SQL题目答案【1】 select * from employ 【2】 select department_name from departments d join employ e on d.department_id=e.department_id where e.employee_id=2 【3】 select p...

SQL数据库习题答案急急急2 select top 5 姓名,出生年月 as 出生时间,籍贯 from JSY 3 select 类别 from 表名 where left(车牌号,1)='A' and right(车牌号,1)='0' 4 select * from 表名 where 时间<'2003-2-...

java初学者题目第一题: (输入每个值的时候都按回车,这个值中夹杂"stop"列入停止范围) 具体程序如下: import java.util.Scanner; public class WhenStopOthers1 { public static void main(String...

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