教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 基础教育 >

sql数据库基础面试题复习题考试题-全(2)

来源:网络收集 时间:2026-08-15
导读: A、create table student(id int primary key not null) B、create table student(id primary key int not null) C、create table student(id int not null) Alter table student add constraint 约束名称 primary

A、create table student(id int primary key not null) B、create table student(id primary key int not null) C、create table student(id int not null)

Alter table student add constraint 约束名称 primary key (id) D、create table student(id int not null)

add constraint 约束名称 primary key (id)

22、在SQL Server2005中,对userinfo表中列修改错误的是( A、alter table userinfo add age int not null; B、alter table userinfo drop column age;

C、alter table userinfo update column age decimal(6,2) D、alter table userinfo alter column age decimal(6,2)

23、在SQL Server2005中,要删除表studentInfo错误的是( A、if exists(select * from sys.sysobjects where [name]=’studentInfo’) Drop table studentInfo go

B、if object_id(‘studentInfo’) is not null Drop table studentInfo go

C、drop table studentInfo D、delete table studentInfo

第三章

)(选择一项)

)(选择一项)

6、 在SQL Server 2005中,假设表users包含主键列id,那么执行“Update users SET id=20

WHERE id=30”,执行的结果可能是( )。 (选择一项)

A、 如果表中同时含有id 为20和id 为30的记录,则更新失败

B、 如果表中含有id为30的记录,但不包含id为20的记录,则更新失败 C、 执行出错,因为主键列不可以被更新

sql数据库基础面试题复习题考试题-全(2).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/563843.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)