您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()A、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)B、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)C、ALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)D、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()

  • A、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)
  • B、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)
  • C、ALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)
  • D、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

相关考题:

Examine the data of the EMPLOYEES table.EMPLOYEES (EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID)Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee‘s manager, for all the employees who have a manager and earn more than 4000?()A.B.C.D.E.

Click the Exhibit button and examine the data in the EMPLOYEES table.Which three subqueries work? () A.SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);B.SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);C.SELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);D.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);E.SELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);F.SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

如果对关系emp(eno, ename, salary)成功执行下而的SQL语句:CREATE CLUSTER INDEX name_index ON emp(salary)其结果是( )。A) 在emp表上按salary升序创建了一个聚簇索引B) 在emp表上按salary降序创建了一个聚簇索引C) 在emp表上按salary升序创建了一个惟一索引D) 在emp表上按salary降序创建了一个惟一索引A.B.C.D.

评估以下语句: ALTER TABLE employees ADD CONSTRAINT employee_id PRIMARY KEY; 该语句将返回以下哪种结果()A、将返回语法错误B、将向EMPLOYEES表添加约束条件C、将改写EMPLOYEES表的一个现有约束条件D、将启用EMPLOYEES表的一个现有约束条件

要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()A、ALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)B、ALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)C、ALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)D、ALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)

你是公司会计数据库的开发者。数据库包含一个名叫Employees的表。Tom是会计部门的一个成员。Tom的数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限被拒绝,被授予对其他列的SELECT权限。Tom现在要求访问Employees表里的所有数据。你该怎么做?()A、废除Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限B、添加Tom到db_datareader角色C、添加Tom到db_accessadmin角色D、授予Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限。

以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A、更改employees表并禁用emp_manager_fk约束条件B、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C、向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D、更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一

如果对关系emp(eno,ename,salary)成功执行下面的SQL语句:CREATECLUSTERINDEXname_indexONemp(salary),其结果是()A、在emp表上按salary升序创建了一个聚簇索引B、在emp表上按salary降序创建了一个聚簇索引C、在emp表上按salary升序创建了一个唯一索引D、在emp表上按salary降序创建了一个唯一索引

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?()A、Column definitions cannot be altered to add DEFAULT values.B、A change to the DEFAULT value affects only subsequent insertions to the table.C、Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.D、All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

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?()A、SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary BETWEEN t.min _ salary AND t.max_salaryB、SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary t.min_salary, tax_percentC、SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE MIN(e.salary) = t.min_salary AND MAX(e.salary) = t.max_salaryD、You cannot find the information because there is no common column between the two tables.

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? ()A、SELECT a.last_name, a.salary, a.department_id, b.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;B、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))C、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);D、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);

Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()A、SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);C、SELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);D、SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);E、SELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);F、SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

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?()A、SELECT a.last_name, a.salary, a.department_id,B、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;C、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))D、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);E、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);

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? ()A、SELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);C、SELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);D、SELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);E、SELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);F、SELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

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?()A、Column definitions cannot be altered to add DEFAULT values.B、A change to the DEFAULT value affects only subsequent insertions to the table.C、Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.D、All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

单选题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?()ASELECT a.last_name, a.salary, a.department_id,Bmaxsal 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;CSELECT 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))DSELECT 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);ESELECT 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);

多选题Examine the data in the EMPLOYEES table: Which three subqueries work? ()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);CSELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);DSELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);ESELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));

单选题您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()AALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)BALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)CALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)DALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

单选题评估以下语句: ALTER TABLE employees ADD CONSTRAINT employee_id PRIMARY KEY; 该语句将返回以下哪种结果()A将返回语法错误B将向EMPLOYEES表添加约束条件C将改写EMPLOYEES表的一个现有约束条件D将启用EMPLOYEES表的一个现有约束条件

单选题你是公司会计数据库的开发者。数据库包含一个名叫Employees的表。Tom是会计部门的一个成员。Tom的数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限被拒绝,被授予对其他列的SELECT权限。Tom现在要求访问Employees表里的所有数据。你该怎么做?()A废除Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限B添加Tom到db_datareader角色C添加Tom到db_accessadmin角色D授予Tom数据库用户帐户对表Employees里的列Salary和Bonus Percentage的SELECT权限。

单选题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?()AColumn definitions cannot be altered to add DEFAULT values.BA change to the DEFAULT value affects only subsequent insertions to the table.CColumn definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.DAll the rows that have a NULL value for the SALARY column will be updated with the value 5000.

单选题以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).A更改employees表并禁用emp_manager_fk约束条件B向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员C向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识D更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一

多选题Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department_id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);CSELECT distinct department_id FROM employees WHERE salary ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);DSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);ESELECT last_name FROM employees WHERE salary ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

单选题要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()AALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)BALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)CALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)DALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)

单选题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?()AColumn definitions cannot be altered to add DEFAULT values.BA change to the DEFAULT value affects only subsequent insertions to the table.CColumn definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.DAll the rows that have a NULL value for the SALARY column will be updated with the value 5000.

单选题Examine the structure of the EMPLOYEES, DEPARTMENTS, and TAX tables. EMPLOYEES NOT NULL, Primary EMPLOYEE_ID NUMBER Key VARCHAR2 EMP_NAME (30) VARCHAR2 JOB_ID (20) SALARY NUMBER References MGR_ID NUMBER EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table DEPARTMENTS NOT NULL, DEPARTMENT_ID NUMBER Primary Key VARCHAR2 DEPARTMENT_NAME |30| References MGR_ID column MGR_ID NUMBER of the EMPLOYEES table TAX MIN_SALARY NUMBER MAX_SALARY NUMBER TAX_PERCENT NUMBER For which situation would you use a nonequijoin query?()ATo find the tax percentage for each of the employees.BTo list the name, job id, and manager name for all the employees.CTo find the name, salary, and department name of employees who are not working with Smith.DTo find the number of employees working for the Administrative department and earning less then 4000.ETo display name, salary, manager ID, and department name of all the employees, even if the employees do not have a department ID assigned.

多选题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? ()ASELECT * FROM employees where salary (SELECT MIN(salary) FROM employees GROUP BY department _ id);BSELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department _ id);CSELECT distinct department_id FROM employees Where salary ANY (SELECT AVG(salary) FROM employees GROUP BY department _ id);DSELECT department_id FROM employees WHERE SALARY ALL (SELECT AVG(salary) FROM employees GROUP BY department _ id);ESELECT last_name FROM employees Where salary ANY (SELECT MAX(salary) FROM employees GROUP BY department _ id);FSELECT department_id FROM employees WHERE salary ALL (SELECT AVG(salary) FROM employees GROUP BY ANG (SALARY));