题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-09-02 00:59:25

[简答题]declare @a char(8),@b varchar(10)
declare @c numeric(5,2)
declare @d int
set @d=80
declare xxx cursor
for select 学号,课程名,成绩
from score
open xxx
fetch xxx into @a,@b,@c
while @@fetch_status=0
begin
if(@c>=@d) print @a+replicate(' ',3)+@b+str(@c,5)
fetch from xxx into @a,@b,@c
end
close xxx
deallocate xxx

更多"[简答题]declare @a char(8),@b varchar("的相关试题:

[简答题]declare @a char(8),@b varchar(10)
declare @s char(8),@r varchar(10)
set @s='20030001'
set @r='数学'
declare xxx cursor
for select 学号,课程名 from score
open xxx
fetch xxx into @a,@b
while @@fetch_status=0
begin
if(@a=@s and @b=@r)
begin
delete from score
where current of xxx
break
end
fetch from xxx into @a,@b
end
close xxx
deallocate xxx
[简答题]declare @a char(8),@b varchar(10),@c numeric(5,2)
declare @d int
set @d=0
declare xxx cursor
for select 学号,课程名,成绩
from score
open xxx
fetch next xxx into @a,@b,@c
while @@fetch_status=0
begin
set @d=@d+1
fetch next from xxx into @a,@b,@c
end
close xxx
deallocate xxx
print @d
[简答题] declare @a char(6)
set @a='刘亮'
if(exists(select * from students where 姓名=@a))
print '姓名为'+@a+'的同学存在!'
else
print '姓名为'+@a+'的同学不存在!'
[简答题] declare @a char(8)
set @a='计算机'
select 计算机专业人数=count(*)
from students
where left(专业,3)=@a
[判断题]Char与varchar是一样的
A.正确
B.错误
[判断题]char和VarChar都是字符型,所以它们是完全一样的。()
A.正确
B.错误
[单选题]表book中包含三个字段:title(varchar), author(varchar), price(decimal(6,2))。Author的默认值是’UNKNOW’,执行SQL语句:insert book (title,price) values ('jsp', 50)。以下结果正确的是
A.插入失败,SQL语句有错
B.插入成功,author列的数据是UNKNOW
C.插入成功,author列的数据是NULL
D.插入成功,author列的数据是50
[简答题]declare @c numeric(5,2)
declare @c1 int, @c2 int, @c3 int, @c4 int
set @c1=0; set @c2=0; set @c3=0; set @c4=0
declare xxx cursor
for select 成绩 from score
open xxx
fetch xxx into @c
while @@fetch_status=0
begin
if(@c>=90) set @c1=@c1+1;
else if(@c>=70) set @c2=@c2+1;
else if(@c>=60) set @c3=@c3+1;
else set @c4=@c4+1
fetch from xxx into @c
end
close xxx
deallocate xxx
print '优秀生人数:'+str(@c1,5);
print '良好生人数:'+str(@c2,5);
print '及格生人数:'+str(@c3,5);
print '及格生人数:'+str(@c4,5)
[简答题] declare @a numeric(5,2),@b numeric(5,2)
set @a=(select max(成绩) from score)
set @b=(select min(成绩) from score)
print @a-@b
[单选题]char *match(char c)是( )。
A.函数定义的头部
B.函数预说明
C.函数调用
D.指针变量说明
[单选题]对于学生表(学生号 char(5)PRIMARY KEY,姓名 char(6)NOT NULL,年龄 int CHECK(年龄M<2D.,使用如下哪个命令可以成功执行插人操作( )
A.INSERT into学生(学生号,姓名,年龄) VALUES(NULL,'王五',2A.
B.INSERT into 学生(学生号,姓名,年龄) VALUES(01001,'张三',2D.
C.INSERT into 学生(学生号,姓名,年龄) VALUES(01001,李四,NULL)
D.INSERT into 学生(学生号,姓名,年龄) VALUES(01001,NULL,2A.
[单选题]有关varchar和nvarchar的比较,下列说法正确的有()。
A.它们都是字符类型数据
B.它们都是可变长度字符类型数据
C.Varchar存储Unicode字符数据
D.nvarchar存储Unicode字符数据
[单选题]现有表Employee,字段id(int),firstname(varchar),lastname(varchar);以下sql语句错误的是()。
A.select firstname+'.'+lastname as 'name' from employee
B.select firstname+'.'+lastname = 'name' from employee
C.select 'name'= firstname+'.'+lastname from employee
D.select firstname,lastname from employee
[简答题]create procedure xxk6
(
@a char(8),@b varchar(10)
)
as
begin
delete from score
where 学号=@a and 课程名=@b
end
[简答题]create procedure xxk4
(
@a char(8),@b varchar(10),@c numeric(5,2)
)
as
begin
update score
set 成绩=@c
where 学号=@a and 课程名=@b
end
[判断题]在一条Declare语句中只能申明一个局部变量。()
A.正确
B.错误

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码