The EMPLOYEES table contains these columns:LAST_NAME VARCHAR2 (25)SALARY NUMBER (6,2)COMMISSION_PCT NUMBER (6)You need to write a query that will produce these results:1. Display the salary multiplied by the commission_pct.2. Exclude employees with a zero commission_pct.3. Display a zero for employees with a null commission value. Evaluate the SQL statement:SELECT LAST_NAME, SALARY*COMMISSION_PCT FROM EMPLOYEESWHERE COMMISSION_PCT IS NOT NULL;What does the statement provide? ()
A. All of the desired results
B. Two of the desired results
C. One of the desired results
D. An error statement
第1题:
在SQL Server 2000中,现要在employees表的first_name和last_name列上建立一个唯一的非聚集复合索引,其中first_name列数据的重复率是5%,last_name列数据的重复率是10%。请补全下列语句使以first_name和last_name列作为条件的查询效率最高。
CREATE UNIQUE NONCLUSTERED INDEX Idx_Name
ON employees(______)
第2题:
The EMP table contains these columns:LAST_NAME VARCHAR2 (25)SALARY NUMBER (6,2)DEPARTMENT_ID NUMBER (6)You need to display the employees who have not been assigned to any department. You write the SELECT statement:SELECT LAST_NAME, SALARY, DEPARTMENT_IDFROM EMPWHERE DEPARTMENT_ID = NULL;What is true about this SQL statement ?()
A.The SQL statement displays the desired results.
B.The column in the WHERE clause should be changed to display the desired results.
C.The operator in the WHERE clause should be changed to display the desired results.
D.The WHERE clause should be changed to use an outer join to display the desired results.
第3题:
16、MySQL数据库中,通常将用户写入对应的权限表来控制访问权限的,以下属于用户权限得选项()。
A.User
B.db
C.table_priv
D.columns_priv
第4题:
找出"作者"库表中没有出现在"获奖名单"库表中的所有作者信息的SQL语句,(提示:使用
NOT IN,NOT EXISTS,以及外部连接(+)三种方法),并说明那种方法是不优化的
出版社: 出版社代码 char(2),出版社名称 varchar2(32)
图书: 图书编号 char(8),图书名称 varchar2(128),出版社代码 char(2),作者代号
char(4),图书简介 varchar2(128)
作者: 作者代号 char(4),作者名称 varchar2(10),性别 char(1),年龄 number(3),文学
方向 varchar2(64)
获奖名单: 获奖日期 date,获奖人员 char(4)
第5题:
使用salary作为职工的工资列,若职工工资最高到千位,小数点后保留两位,则salary的数据类型应该是()
A.numeric(4, 2)
B.numeric(6, 2)
C.money(4, 2)
D.money(6, 2)