您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()
第1题:
要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()
第2题:
以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).
第3题:
The EMPLOYEES table has these columns: LAST NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement: ALTER TABLE EMPLOYEES MODIFY ( SALARY DEFAULT 5000); What is true about your ALTER statement?()
第4题:
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view? ()
第5题:
Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER SALARY NUMBER What is the correct syntax for an inline view?()
第6题:
The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()
第7题:
SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);
SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);
SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);
SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);
SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);
SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
第8题:
将返回语法错误
将向EMPLOYEES表添加约束条件
将改写EMPLOYEES表的一个现有约束条件
将启用EMPLOYEES表的一个现有约束条件
第9题:
Column definitions cannot be altered to add DEFAULT values.
A change to the DEFAULT value affects only subsequent insertions to the table.
Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.
All the rows that have a NULL value for the SALARY column will be updated with the value 5000.
第10题:
SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);
SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);
SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);
SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);
SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));
第11题:
Column definitions cannot be altered to add DEFAULT values.
A change to the DEFAULT value affects only subsequent insertions to the table.
Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.
All the rows that have a NULL value for the SALARY column will be updated with the value 5000.
第12题:
SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department _ id);
SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);
SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);
SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);
SELECT last_name FROM employees Where salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);
SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));
第13题:
你是公司会计数据库的开发者。数据库包含一个名叫Employees的表。Tom是会计部门的一个成员。Tom的数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限被拒绝,被授予对其他列的SELECT权限。Tom现在要求访问Employees表里的所有数据。你该怎么做?()
第14题:
如果对关系emp(eno,ename,salary)成功执行下面的SQL语句:CREATECLUSTERINDEXname_indexONemp(salary),其结果是()
第15题:
Examine the structures of the EMPLOYEES and TAX tables. EMPLOYEES EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2 (30) JOB_ID VARCHAR2 (20) SALARY NUMBER References MGR_ID NUMBER EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT _ID column of the DEPARTMENT table TAX MIN_SALARY NUMBER MAX_SALARY NUMBER TAX_PERCENT NUMBER Percentage tax for given salary range You need to find the percentage tax applicable for each employee. Which SQL statement would you use?()
第16题:
Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()
第17题:
Examine the data in the EMPLOYEES table: LAST_NAME DEPARTMENT_ID SALARY Getz 10 3000 Davis 20 1500 Bill 20 2200 Davis 30 5000 ... Which three subqueries work? ()
第18题:
SELECT a.last_name, a.salary, a.department_id,
maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary < b.maxsal;
SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))
SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);
SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);
第19题:
ALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)
ALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)
ALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)
ALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)
第20题:
废除Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限
添加Tom到db_datareader角色
添加Tom到db_accessadmin角色
授予Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限。
第21题:
更改employees表并禁用emp_manager_fk约束条件
向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员
向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识
更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一
第22题:
ALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)
ALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)
ALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)
ALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)
第23题:
To find the tax percentage for each of the employees.
To list the name, job id, and manager name for all the employees.
To find the name, salary, and department name of employees who are not working with Smith.
To find the number of employees working for the Administrative department and earning less then 4000.
To display name, salary, manager ID, and department name of all the employees, even if the employees do not have a department ID assigned.