以下SQL命令执行什么操作() ALTER TABLE employees ADD CONSTRAINT emp_manager_fk FOREIGN KEY(manager_id) REFERENCES employees(employee_id).
第1题:
您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()
第2题:
删除PRIMARYKEY约束条件及其所有依赖约束条件的语法是什么()
第3题:
Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table?()
第4题:
Which statement explicitly names a constraint?()
第5题:
You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task? ()
第6题:
CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) NOT NULL CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);
CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));
CREATE TABLE EMP (empno NUMBER(4) ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));
CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));
第7题:
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)
第8题:
ALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);
MODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);
ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;
MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;
CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;
You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.
第9题:
Only the EMPLOYEES table.
Only the EMPLOYEES table and its corresponding primary key index.
The EMPLOYEES table and partition P1.
The EMPLOYEES table, IPK_EMP index, and the SALES table.
第10题:
You cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.
The EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID column.
The EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.
Any other column of NUMBER data type in your schema can use the EMP_ID_SEQ sequence.
The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES table.
The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEE_ID column.
第11题:
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(部门标识)
第12题:
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);
CREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;
CREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;
第13题:
要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()
第14题:
You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?()
第15题:
The EMPLOYEES table is stored in the SAMPLE tablespace. The corresponding IPK_EMP index for the EMPLOYEES table’s primary key is stored in the INDX tablespace. Out of 12 partitions, only partition P1 of the SALES table is stored in the SAMPLE tablespace. Which object will be exported by this command?() exp system/manager tablespaces=SAMPLE
第16题:
Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMP table?()
第17题:
You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?()
第18题:
ALTER VIEW emp_dept_vu (ADD manager_id NUMBER);
MODIFY VIEW emp_dept_vu (ADD manager_id NUMBER);
ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department_id = d.department_id;
MODIFY VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;
CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department_id = d.department_id;
You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.
第19题:
ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students(student_id);
ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);
ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);
ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);
ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id);
第20题:
将返回语法错误
将向EMPLOYEES表添加约束条件
将改写EMPLOYEES表的一个现有约束条件
将启用EMPLOYEES表的一个现有约束条件
第21题:
CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);
CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));
CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));
CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));
第22题:
更改employees表并禁用emp_manager_fk约束条件
向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理必须已是雇员
向EMPLOYEES表添加FOREIGN KEY约束条件,要求经理标识应匹配每个雇员标识
更改employees表并添加FOREIGN KEY约束,要求每个雇员标识必须唯一
第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.