题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-02 22:51:55

[单选题]create table student ( id int identity(1,1), name varchar(20) ) alter table student add constraint uq_name unique(name) insert into student values(null) insert into student values(null) insert into student values('jack') insert into student values('jack')
A.1
B.2
C.3
D.4

更多"[单选题]create table student ( id int "的相关试题:

[单选题]使用CREATE TABLE语句建立的是 ( )
A.数据库模式
B.表
C.视图
D.索引
[单选题]建立如下数据库表: CREATE TABLE department( DeptID int NOT NULL primary key, DeptName varchar (20) NOT NULL ) CREATE TABLE Employee ( EmployeeID int NOT NULL, DeptID int NOT NULL, Name varchar (20) NOT NULL ) 要想保证Employee表中每一个雇员(Employe
A.把EmployeeID 和DeptID 设为组合主键。
B.把EmployeeID设为主键,同时在DeptID列上创建一个外健约束。
C.把EmployeeID设为主键,同时在DeptID列上创建一个检查约束。
D.在DepartmentID列上创建一个唯一约束,同时在DeptID列上创建一个外健约束。
[多选题]创建表sql语句如下: create table userInfo ( userId int identity(-1,1), 第一行 username nvarchar(20) not null, 第二行 cardNO char not null, 第三行 age smallint(2), 第四行 address ntext(300) 第五行 ) 执行时,会在()出现错误。(选两项)
A.第一行
B.第三行
C.第四行
D.第五行
[判断题]使用CREATE TABLE tb_cab_bak LIKE tb_cab复制表后,只复制字段,不复制表结构。
A.正确
B.错误
[单选题]在 MySQL 中, 若用如下的SQL语句创建了一个表SC:CREATE TABLE SC (S# VARCHAR(6) NOT NULL, C# VARCHAR(3) NOT NULL, SCORE INT, NOTE VARCHAR(20));
A.(NULL, '103', 80, '选修')
B.('200823', '101', NULL, NULL)
C.('201132', NULL, 86, ' ')
D.('201009', '111', 60, 必修)
[判断题]在CREATE TABLE语句中,通常使用(PRIMARY KEY)关键字来指定主键,在MySQL中,通常使用(NULL)值来表示一个列,没有值或缺值的情况
A.正确
B.错误
[单选题]在查询分析器中你运行下面的语句,得到的结果是(选一项) CREATE TABLE numbers( N1 INT, N2 NUMERIC(5,0), N3 NUMERIC(4,2) )GO INSERT INTO numbers VALUES(1.5,1.5,1.5) SELECT * FORM numbers
A.返回2,2和1.50的结果集合
B.返回1.5,1.5,和1.5的结果集合
C.CREATE TABLE命令不会执行,因为你无法为列N2设置精度为0
D.返回1,2,和1.50的结果集合
[单选题]运行如下T-SQL,结果返回包含( )的记录集。(选一项) create table scores ( scoreid int identity(1,2), score numeric(4,2) not null, courseid int ) insert into scores values(90.5, null); insert into scores values(100, 2); select * from scores;
A.1、90.5、null 3、100、2
B.1、100、2l
C.1、90.50、null
D.1、90.5、null 3、100.0、2
[多选题]创建存储过程如下: CREATE procedure bookproc @id int, @title char(20) OUTPUT as select @title=title from book where id= @id 执行该存储过程的方法正确的是(选两项)
A.exec bookproc 1,@title output print @title
B.exec bookproc @id =1,@title output print @title
C.declare @title char(20) exec bookproc 1,@title output print @title
D.declare @title char(20) exec bookproc @id =1,@title output print @title
[单选题]考虑下面的存储过程 CREATE Procedure Lookup(@a int) As If @a is null Begin Print 'You forgot to pass in a parameter' Return End Select * from syssobjects where id=@a Return 如果这个存储过程不带参数运行会发生(选一项)
A.存储过程会打印“You forgot to pass in a parameter”
B.该存储过程会基于无参数情况做一个查找,返回表中的所有行
C.该存储过程有语法错误
D.服务器打印一条消息,提示该存储过程需要提供一个参数
[单选题]对于下面的存储过程: CREATE PROCEDURE Myp1 @p Int As Select Studentname,Age from Students where Age=@p 假如你要在Students表中查找年龄是18岁的学生,()可以正确的调用这个存储过。 (选一项)
A.EXEC Myp1 @p = '18'
B.EXEC Myp1 @p = 18
C.EXEC Myp1 p = '18'
D.EXEC Myp1 p = 18
[单选题]有以下程序
Int a=4;
Int f(int n)
{ int t=0;
Static int a=5;
If(n%2) {int a=6; t+=a++;}
Else {int a=7; t+=a++;}
Return t+a++;
}
Main()
{ int s=a,i=0;
For(;i<2;i++)
S+=f(i);
Printf("%d\n",s);
}
程序运行后的输出结果是()。
A.24
B.28
C.32
D.36
[单选题]有以下程序
Void fun(int *a,int i,int j)
{ int t;
If (i{ t=a[i];a[i]=a[j];a[j]=t;
Fun(a,++i,--j);
}
}
Main()
{ int a[]={1,2,3,4,5,6},i;
Fun(a,0,5);
For(i=0;i<6;i++)
Printf("%d ",a[i]);
}
执行后输出结果是()。
A.6 5 4 3 2 1
B.4 3 2 1 5 6
C.4 5 6 1 2 3
D.1 2 3 4 5 6
[单选题]有以下程序
Int a=2;
Int f(int n)
{static int a=3;
Int t=0;
If(n%2){ static int a=4; t+=a++; }
Else { static int a=5; t+=a++; }
Return t+a++;
}
Main()
{int s=a,i;
For(i=0;i<3;i++) s+=f(i);
Printf("%d\n",s);
}
程序运行后的输出结果是()。
A.26
B.28
C.29
D.24
[单选题]有以下程序
Void f(int *a,int i, int j)
{ int t;
If(i{ t=a[i];a[i]=a[j];a[j]=t;
F(a,i+1,j-1);
}
}
Main()
{ int i,aa[5]={1,2,3,4,5};
F(aa,0,4);
For(i=0;i<5;i++)printf("%d,",aa[i]);printf("\n");
}
执行后输出结果是()。
A.5,4,3,2,1,
B.5,2,3,4,1,
C.1,2,3,4,5,
D.1,5,4,3,2,
[单选题]有以下程序
Void fun(int *a,int i,int j)
{ int t;
If(i{ t=a[i];a[i]=a[j];a[j]=t;
I++; j--;
Fun(a,i,j);
}
}
Main()
{ int x[]={2,6,1,8},i;
Fun(x,0,3);
For(i=0;i<4;i++) printf("%2d",x[i]);
Printf("\n");
}
程序运行后的输出结果是()。
A.1 2 6 8
B.8 6 2 1
C.8 1 6 2
D.8 6 1 2
[单选题]下面程序的输出是()。
Int m=13;
Int fun2(int x,int y)
{ int m=3;
Return(x*y-m);
}
Main( )
{ int a=7,b=5;
Printf("%d\n",fun2(a,b)/m);}
A.1
B.2
C.7
D.10
[单选题]以下程序的输出结果是()。
F(int b[],int m,int n)
{ int i,s=0;
For(i=m;iReturn s;
}
Main()
{int x,a[]={1,2,3,4,5,6,7,8,9};
X=f(a,3,7);
Printf("%d\n",x);
}
A.10
B.18
C.8
D.15

我来回答:

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

订单号:

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