单选题DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()AALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件BALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件CADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败DALTER TABLE语句执行成功,但不重新创建引用约束条件

单选题
DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()
A

ALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件

B

ALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件

C

ADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败

D

ALTER TABLE语句执行成功,但不重新创建引用约束条件


参考解析

解析: 暂无解析

相关考题:

Examine the description of the EMPLOYEES table:EMP_ID NUMBER(4) NOT NULLLAST_NAME VARCHAR2(30) NOT NULLFIRST_NAME VARCHAR2(30)DEPT_ID NUMBER(2)JOB_CAT VARCHARD2(30)SALARY NUMBER(8,2)Which statement shows the maximum salary paid in each job category of each department? ()A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary MAX (salary);B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;C. SELECT dept_id, job_cat, MAX(salary) FROM employees;D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;

阅读以下说明,回答问题1至问题3,将答案写在对应栏内。【说明】关于一位花商有以下一些事实。(1)销售在不同地区生长的花,这些地区一年的量低温度在一定范围内变化。(2)想用编号来表示发货类型。(3)要出售某些类型的花。假定已经通过SQL语句建立了基本表:CREATE TABLE Zone(ID Char(2) PRIMARY KEY,LowerTemp Number (3),UpperTemp Number (3));CREATE TABLE Delivery(ID char(2)PRIMARY KEY,Category VarChar (5),DelSize Number (5,3)):CREATE TABLE FlowerInfo(ID Char(3) CONSTRAINTFlowerinfo_ id _ pk PRIMARY KEY,ComName VarChar (25),LatName VarChar (30),Czone Number (3),Hzone Number (3),Delivered Number (3),SunNeed Char (3),PRIMARY KEY (ID)):地区(ID,最高温度,最低温度)发货(ID,发货类型,发货规格)花的信息(ID,普通名,拉丁名,花能够生长的最冷地区,花能够生长的最热地区,发货类型,日光需求)写出语句,将(ID=1,Category=pot,DelSize=1.5)的数据插入DELIVERY表中。

Examine the data in the EMPLOYEES and DEPARTMENTS tables:EMPLOYEESEMP_NAME DEPT_ID MGR_ID JOB_ID SALARYEMPLOYEE_ID101 Smith 20 120 SA_REP 4000102 Martin 10 105 CLERK 2500103 Chris 20 120 IT_ADMIN 4200104 John 30 108 HR_CLERK 2500105 Diana 30 108 IT_ADMIN 5000106 Smith 40 110 AD_ASST 3000108 Jennifer 30 110 HR_DIR 6500110 Bob 40 EX_DIR 8000120 Ravi 20 110 SA*DIR 6500DEPARTMENTSDEPARTMENT_ID DEPARTMENT_NAME10 Admin20 Education30 IT40 Human ResourcesAlso examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables:CREATE TABLE departments(department_id NUMBER PRIMARY KEY,department _ name VARCHAR2(30));CREATE TABLE employees(EMPLOYEE_ID NUMBER PRIMARY KEY,EMP_NAME VARCHAR2(20),DEPT_ID NUMBER REFERENCESdepartments(department_id),MGR_ID NUMBER REFERENCESemployees(employee id),MGR_ID NUMBER REFERENCESemployees(employee id),JOB_ID VARCHAR2(15).SALARY NUMBER);ON the EMPLOYEES,On the EMPLOYEES table, EMPLOYEE_ID is the primary key.MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key.Examine this DELETE statement:DELETEFROM departmentsWHERE department id = 40;What happens when you execute the DELETE statement?()

Given the following requirements:Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values ‘C‘, ‘H‘ and ‘N‘, and permits inserts only when a corresponding value for the employee‘s department exists in the DEPARTMENT table.Which of the following CREATE statements will successfully create this table?()A.CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN (‘C‘,‘H‘,‘N‘)), );B.CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES (‘C‘,‘H‘,‘N‘) );C.CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN (‘C‘,‘H‘,‘N‘)), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );D.CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN (‘C‘,‘H‘,‘N‘)) );

Click the Exhibit button and examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:DELETE employee_id, salary, job_idFROM employeesWHERE dept_id = 90;Why does the DELETE statement fail when you execute it?()A.There is no row with dept_id 90 in the EMPLOYEES table.B.You cannot delete the JOB_ID column because it is a NOT NULL column.C.You cannot specify column names in the DELETE clause of the DELETE statement.D.You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.

为表TEST中ID列添加主键约束的语法是()A、ALTER  TABLE  TEST  CHANGE( ID  INT  PRIMARY  KEY)B、ALTER  TABLE  TEST  ADD( ID  INT  PRIMARY  KEY)C、ALTER  TABLE  TEST  MODIFY( ID  INT  PRIMARY  KEY)D、ALTER  TABLE  TEST  ADD  CONSTRAINT PK  PRIMARY KEY (ID)

PO_DETAILS表包含以下列: PO_NUM NUMBER NOT NULL, Primary Key PO_LINE_ID NUMBER NOT NULL, Primary Key PRODUCT_ID NUMBER Foreign Key to PRODUCT_ID column of the PRODUCTS table QUANTITY NUMBER UNIT_PRICE NUMBER(5,2) 请评估以下语句: ALTER TABLE po_details DISABLE CONSTRAINT po_details_pk CASCADE;此语句用于完成什么任务()A、新创建一个对PO_NUM列的PRIMARYKEY约束条件B、删除并重新创建对PO_NUM列的PRIMARYKEY以及FOREIGNKEY的约束条件C、禁用依赖于PO_NUM列的所有FOREIGNKEY约束条件D、禁用对PO_NUM列的约束条件,同时创建PRIMARYKEY索引

数据库中的中的PROFITS表中PRODUCT_NAME与SALE_PERIOD列建立主键。下列哪个语句无法定义这个主键?()A、create table profits(product_name varchar2(10),sale_perion varchar2(10),profit number, constraint pk_profits_01 primary key(product_name,sale_period))B、alter table profits add constraint pk_profits_01 primary key(product_name,sale_period)deferrablC、以上两者都是

“雇员”表包含以下列: EMPLOYEE_ID NOT NULL, Primary Key SSNUM NOT NULL, Unique LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER 部门表中 DEPARTMENT_ID 列的外键 SALARY NUMBER(8,2) 如果执行以下语句: CREATE INDEX emp_name_idx ON employees(last_name, first_name); 以下哪个说法是的()A、此语句会创建一个基于函数的索引B、因为语法错误,此语句将失败C、该语句将创建一个组合唯一索引D、该语句将创建一个组合非唯一索引

TEAMS表包含以下各列: TEAM_ID NUMBER(4) Primary Key TEAM_NAMEVARCHAR2(20) MGR_ID NUMBER(9) TEAMS表当前是空表。您需要允许用户在经理标识值中包含文本字符。应使用以下哪条语句来执行此任务()A、ALTER teams MODIFY(mgr_id VARCHAR2(15))B、ALTERTABLE teams MODIFY(mgr_idVARCHAR2(15))C、ALTERTABLE teams REPLACE(mgr_id VARCHAR2(15))D、ALTER teams TABLEMODIFYCOLUMN(mgr_id VARCHAR2(15))

被FOREIGN KEY参照的列在表中应该具有()A、DEFAULT约束B、CHECK约束C、PRIMARY KEY约束D、REIGN KEY约束

在oracle数据库中,检查用于创建表的命令:SQLCREATE TABLEorders(oid NUMBER(6)PRIMARY KEY,odate DATE,ccode NUMBER(6),oamt NUMBER(10,2))TABLESPACE users;下列哪两种说法正确()。A、Orders表是在USERS表空间中创建的唯一对象B、一个NOTNULL约束的OID列上创建C、CHECK约束是在OID列上创建D、Orders表和唯一索引都在USERS表空间中创建

Given the following requirements: Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values 'C', 'H' and 'N', and permits inserts only when a corresponding value for the employee's department exists in the DEPARTMENT table. Which of the following CREATE statements will successfully create this table?()A、CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN ('C','H','N')), );B、CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES ('C','H','N') );C、CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN ('C','H','N')), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );D、CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN ('C','H','N')) );

Which two statements are true about the primary key constraint in a table? ()A、It is not possible to disable the primary key constraint.B、It is possible to have more than one primary key constraint in a single table.C、The primary key constraint can be referred by only one foreign key constraint.D、The primary key constraint can be imposed by combining more than one column.E、The non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.

Examine the data in the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA*DIR 6500 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables: CREATE TABLE departments (department_id NUMBER PRIMARY KEY, department _ name VARCHAR2(30)); CREATE TABLE employees (EMPLOYEE_ID NUMBER PRIMARY KEY, EMP_NAME VARCHAR2(20), DEPT_ID NUMBER REFERENCES departments(department_id), MGR_ID NUMBER REFERENCES employees(employee id), MGR_ID NUMBER REFERENCES employees(employee id), JOB_ID VARCHAR2(15). SALARY NUMBER); ON the EMPLOYEES, On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key. Examine this DELETE statement: DELETE FROM departments WHERE department id = 40; What happens when you execute the DELETE statement?()A、Only the row with department ID 40 is deleted in the DEPARTMENTS table.B、The statement fails because there are child records in the EMPLOYEES table with department ID 40.C、The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 110 and 106 are deleted from the EMPLOYEES table.D、The row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 106 and 110 and the employees working under employee 110 are deleted from the EMPLOYEES table.E、The row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.F、The statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

单选题PO_DETAILS表包含以下列: PO_NUM NUMBER NOT NULL, Primary Key PO_LINE_ID NUMBER NOT NULL, Primary Key PRODUCT_ID NUMBER Foreign Key to PRODUCT_ID column of the PRODUCTS table QUANTITY NUMBER UNIT_PRICE NUMBER(5,2) 请评估以下语句: ALTER TABLE po_details DISABLE CONSTRAINT po_details_pk CASCADE;此语句用于完成什么任务()A新创建一个对PO_NUM列的PRIMARYKEY约束条件B删除并重新创建对PO_NUM列的PRIMARYKEY以及FOREIGNKEY的约束条件C禁用依赖于PO_NUM列的所有FOREIGNKEY约束条件D禁用对PO_NUM列的约束条件,同时创建PRIMARYKEY索引

单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_ NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()ASELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000;BSELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) 5000 AND MAX(salary) 15000 GROUP BY dept_id;CSELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) 5000 AND MAX(salary) 15000;DSELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) 5000 AND MAX(salary) 15000;ESELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) 5000 AND MAX(salary) 15000;

单选题Examine the structure if the EMPLOYEES table: Column name Data Type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) NOT NULL SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You need to create a view called EMP_VU that allows the user to insert rows through the view. Which SQL statement, when used to create the EMP_VU view, allows the user to insert rows?()ACREATE VIEW emp_Vu AS SELECT employee_id, emp_name, department_id FROM employees WHERE mgr_id IN (102, 120);BCREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id department_id FROM employees WHERE mgr_id IN (102, 120);CCREATE VIEW emp_Vu AS SELECT department_id, SUM(sal) TOTALSAL FROM employees WHERE mgr_id IN (102, 120) GROUP BY department_ id;DCREATE VIEW emp_Vu AS SELECT employee_id, emp_name, job_id, DISTINCT department_id FROM employees;

单选题Examine the data in the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD_ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EX_DIR 8000 120 Ravi 20 110 SA*DIR 6500 DEPARTMENTS DEPARTMENT_ID DEPARTMENT_NAME 10 Admin 20 Education 30 IT 40 Human Resources Also examine the SQL statements that create the EMPLOYEES and DEPARTMENTS tables: CREATE TABLE departments (department_id NUMBER PRIMARY KEY, department _ name VARCHAR2(30)); CREATE TABLE employees (EMPLOYEE_ID NUMBER PRIMARY KEY, EMP_NAME VARCHAR2(20), DEPT_ID NUMBER REFERENCES departments(department_id), MGR_ID NUMBER REFERENCES employees(employee id), MGR_ID NUMBER REFERENCES employees(employee id), JOB_ID VARCHAR2(15). SALARY NUMBER); ON the EMPLOYEES, On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. DEPT_ID is foreign key to DEPARTMENT_ID column of the DEPARTMENTS table. On the DEPARTMENTS table, DEPARTMENT_ID is the primary key. Examine this DELETE statement: DELETE FROM departments WHERE department id = 40; What happens when you execute the DELETE statement?()AOnly the row with department ID 40 is deleted in the DEPARTMENTS table.BThe statement fails because there are child records in the EMPLOYEES table with department ID 40.CThe row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 110 and 106 are deleted from the EMPLOYEES table.DThe row with department ID 40 is deleted in the DEPARTMENTS table. Also the rows with employee IDs 106 and 110 and the employees working under employee 110 are deleted from the EMPLOYEES table.EThe row with department ID 40 is deleted in the DEPARTMENTS table. Also all the rows in the EMPLOYEES table are deleted.FThe statement fails because there are no columns specifies in the DELETE clause of the DELETE statement.

单选题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?()AALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);BMODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);CALTER 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;DMODIFY 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;ECREATE 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;FYou must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.

多选题Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID NUMBER SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You created a sequence called EMP_ID_SEQ in order to populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true? ()AYou cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.BThe EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID column.CThe EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.DAny other column of NUMBER data type in your schema can use the EMP_ID_SEQ sequence.EThe EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES table.FThe EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEE_ID column.

单选题Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEESColumn name Data type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2 (30) JOB_ID VARCHAR2 (20) SALARY NUMBER MGR_ID NUMBER References EMPLOYEE_ID COLUMN DEPARTMENT ID NUMBER Foreign key to DEPARTMENT ID column of the DEPARTMENTS table DEPARTMENTSColumn name Data type Remarks DEPARTMENT_ID NUMBER NOT NULL, Primary Key DEPARTMENT_NAME VARCHAR2(30) MGR_ID NUMBER References MGR_ID column of the EMPLOYEES table Evaluate this SQL statement: SELECT employee_id, e.department_id, department_name, salary FROM employees e, departments d WHERE e. department_id = d.department_id; Which SQL statement is equivalent to the above SQL statement? ()ASELECT employee_id, department_id, department_name, salary FROM employees WHERE department_id IN (SELECT department_id FROM departments);BSELECT employee_id, department_id, department_name, salary FROM employees NATURAL JOIN departments;CSELECT employee_id, d.department_id, department_name, salary FROM employees e JOIN departments d ON e.department _ id = d. department_id;DSELECT employee_id, department_id, department_name, Salary FROM employees JOIN departments USING (e.department_id, d.department_id);

多选题Which two statements are true about the primary key constraint in a table? ()AIt is not possible to disable the primary key constraint.BIt is possible to have more than one primary key constraint in a single table.CThe primary key constraint can be referred by only one foreign key constraint.DThe primary key constraint can be imposed by combining more than one column.EThe non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.

单选题Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEESColumn name Data type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2 (30) JOB_ID VARCHAR2 (20) SALARY NUMBER MGR_ID NUMBER References EMPLOYEE_ID COLUMN DEPARTMENT ID NUMBER Foreign key to DEPARTMENT ID column of the DEPARTMENTS table DEPARTMENTSColumn name Data type Remarks DEPARTMENT_ID NUMBER NOT NULL, Primary Key DEPARTMENT_NAME VARCHAR2(30) MGR_ID NUMBER References MGR_ID column of the EMPLOYEES table Evaluate this SQL statement: SELECT employee_id, e.department_id, department_name, salary FROM employees e, departments d WHERE e. department_id = d.department_id; Which SQL statement is equivalent to the above SQL statement?()ASELECT employee_id, department_id, department_name, salary FROM employees WHERE department_id IN (SELECT department_id FROM departments);BSELECT employee_id, department_id, department_name, salary FROM employees NATURAL JOIN departments;CSELECT employee_id, d.department_id, department_name, salary FROM employees e JOIN departments d ON e.department _ id = d. department_id;DSELECT employee_id, department_id, department_name, Salary FROM employees JOIN departments USING (e.department_id, d.department_id);

单选题Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHARD2(30) SALARY NUMBER(8,2) Which statement shows the maximum salary paid in each job category of each department?()ASELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary MAX (salary);BSELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;CSELECT dept_id, job_cat, MAX(salary) FROM employees;DSELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;ESELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;

单选题“雇员”表包含以下列: EMPLOYEE_ID NOT NULL, Primary Key SSNUM NOT NULL, Unique LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) DEPARTMENT_ID NUMBER 部门表中 DEPARTMENT_ID 列的外键 SALARY NUMBER(8,2) 如果执行以下语句: CREATE INDEX emp_name_idx ON employees(last_name, first_name); 以下哪个说法是的()A此语句会创建一个基于函数的索引B因为语法错误,此语句将失败C该语句将创建一个组合唯一索引D该语句将创建一个组合非唯一索引

单选题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.