多选题
正确的Delete SQL语句是)
Aselect * from t_user where f_userid = 1;
Bdelete * from t_user where f_userid = 1;
C delete from t_user where f_userid = 1;
Ddelete t_user where f_userid = 1;
回答错误
正确答案:CD我的答案:BD解析:
Delete语法delete from <table_name | view_name lsynonym_name> [where condition]; from可以省略。
多选题
创建表正确的SQL语句是
Acreate table if not exists student(id int, name
varchar(20));
B create table if exists student(id int, name
varchar(20));
create table student(id int, name varchar(20));
new table student(id int, name varchar(20));
回答错误
正确答案:AC我的答案:AB C解析:
创建表语法create [standard | raw] table [if not exists]<table_name> (colname1 data_type1, colname2data_type2,...);
单选题
删除数据库正确的SQL语句是(
Adelete database courseware;
delete databases courseware;
C drop database if exists courseware;
drop database if exist courseware;
回答错误
正确答案:C我的答案:A解析:
删除数据库的语法drop database [lif exists] <db_name>;
创建视图正确的的SQL语句是()
Acreate view vTest as select * from student;
create view vTest select * from student;
C create view vTest ( select * from student );
create table vTest as ( select * from student );
回答错误
正确答案:A我的答案:C解析:
创建视图的语法create view [if not exists] <view_name>as <query_define>;。
Ⅰ多选题
在存储过程中定义变量正确的的语句是(
define x int;
define x, y int
Cint x
x int
回答错误
正确答案:AB我的答案:BC解析:
存储过程中定义变量需要有define关键字;支持系列定义。
多选题
GBase 8s rename database失败的原因有(()
database closed
B database不存在
C当前正在操作的database
D被更名的database处于打开状态。
回答正确
正确答案:BCD我的答案:BCD解析:
Cannot drop or rename the current database or anyopen database。
l单选题
create database 'CourseWare'产生的数据库名称()
A不敏感
B敏感
C需要明确使用nlscasesensitive 或nlscase insensitive
参数
回答错误
正确答案:A我的答案:C解析:
create database <db_name>产生的数据库名称不敏感。
l多选题
表中新增新列正确的SQL是(()
A alter table student add (Sex smallint);
Balter table student add (age int before Sex);
C alter table student add column(score int);
Dalter table student column add (score int);
回答错误
正确答案:AB我的答案:ABD解析:
新增列语法alter table <tableName | synonymName>add (newColumnName1 data_type1[,
newColumnName2 data_type2,..]) [beforeoldColumnName];。
Ⅰ单选题
重命名表中存在列正确的SQL语句是()
rename student.age to age1;
rename column student.age to age1;
C rename column 'student.age' to 'age1"';
rename column "student.age" to "age1";
回答正确
正确答案:B我的答案:B解析:
重命名表中存在列语法rename column <tableName>.<oldColumnName> to <newColumnName>;。
多选题
创建表正确的SQL语句是)
Acreate table if not exists student(id int, name
varchar(20));
Bcreate table if exists student(id int, name
varchar