文档介绍:员工面试考核试题
考试时间:30分钟姓名:___________ 成绩:___________
一、单选题(共21题,每题3分)
使用SQL命令将教师表teacher中工资salary字段的值增加200,应该使用的命令是(D )。
Replace  salary with salary+200
 Update   teacher  salary   with  salary+200
 Update  set  salary  with  salary+200
 Update  teacher  set  salary=salary+200
使用sql语句进行分组检索时,为了去掉不满足条件的分组,应当(B )。
 使用WHERE子句
 在GROUP BY后面使用HAVING 子句
 先使用WHERE子句,再使用HAVING 子句
 先使用HAVING 子句,再使用WHERE子句
从货物定单数据表(order)中查询出其中定单金额(order_price)在1000和5000之间的定单的详细信息,并按照定单金额(order_price)降序排列。正确的语句是(B )。
 Select * from order where [order_price] between 1000 and 5000
order by [order_price] ASC
 Select * from order where [order_price] between 1000 and 5000
order by [order_price] DESC
Select * from order where 1000<[order_price]<5000 order by [order_price] ASC
 Select * from order where 1000<[order_price]<5000 order by [order_price] DESC
表的两种相关约束是? ( C)
主键和索引
外键和索引
主键和外键
内键和外键
在oracle中下列哪个表名是不允许的( D)。
abc$
abc
abc_
_abc
表A中有以下字段和数据
ColumnA ColumnB
------------------
a null
a null
a null
请问,执行select count(*) from a where columnB=columnB会得到哪个结果(A )。
0
1
3
4
SELECT ename, job, sal FROM emp WHERE job='SALESMAN' OR job='PRESIDENT' AND sal>1500 OR ename is not null与以下哪个是等价? (C )
SELECT ename, job, sal FROM emp WHERE (job='SALESMAN' OR job='PRESIDENT') AND sal>1500 OR ename is not null
SELECT ename, job, sal FROM emp WHERE (job='SALESMAN' OR job='PRESIDENT' AND