网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

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索引

参考答案

更多 “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索引” 相关考题
考题 阅读以下说明,回答问题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?()

考题 Examine the command that is used to create a table: SQL CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER (6), oamtNUMBER(10,2)) TABLESPACE users; Which two statements are true about the effect of the above command()A、A CHECK constraint is created on the OID column.B、A NOT NULL constraint is created on the OID column.C、The ORDERS table is the only object created in the USERS tablespace.D、The ORDERS table and a unique index are created in the USERS tablespace.E、The ORDERS table is created in the USERS tablespace and a unique index is created on the OID columnin the SYSTEM tablespace.

考题 评估此CREATE TABLE语句的执行结果: CREATE TABLE part( part_id NUMBER, part_name VARCHAR2(25), manufacturer_id NUMBER(9), retail_price NUMBER(7,2) NOT NULL, CONSTRAINT part_id_pk PRIMARY KEY(part_id), CONSTRAINT cost_nn NOT NULL(cost), CONSTRAINT FOREIGN KEY (manufacturer_id) REFERENCES manufacturer(id)); 哪一行会导致产生错误()A、6B、7C、8D、9

考题 Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()A、SER_NOB、ORDER_IDC、STATUSD、PROD_IDE、ORD_TOTALF、composite index on ORDER_ID and ORDER_DATE

考题 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.

考题 You need to design a student registration database that contains several tables storing academic information. The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key. You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()A、CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY student (student_id));B、CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));C、CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES student (student_id));D、CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));

考题 Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table?()A、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);B、CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));C、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));D、CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));

考题 Examine the command that is used to create a table:  SQL CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER(6), oamt NUMBER(10,2)) TABLESPACE users;  Which two statements are true about the effect of the above command) ()A、A CHECK constraint is created on the OID column.B、A NOT NULL constraint is created on the OID column.C、The ORDERS table is the only object created in the USERS tablespace.D、The ORDERS table and a unique index are created in the USERS tablespace.E、The ORDERS table is created in the USERS tablespace and a unique index is created on the OIDcolumn in the SYSTEM tablespace.

考题 You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()A、ALTER TABLE students ADD PRIMARY KEY student_id;B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);C、ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);D、ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

考题 Examine the SQL statements that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL STATUS VARCHARD2(10) CHECK (status IN ('CREDIT','CASH')), PROD_ID_NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order id, order date)); For which columns would an index be automatically created when you execute the aboveSQL statement? ()A、SER_NOB、ORDER_IDC、STATUSD、PROD_IDE、ORD_TOTALF、Composite index on ORDER_ID and ORDER_DATE

考题 Examine the following command: CREATE TABLE (prod_id number(4), Prod_name varchar2 (20), Category_id number(30), Quantity_on_hand number (3) INVISIBLE); Which three statements are true about using an invisible column in the PRODUCTS table?()A、The %ROWTYPE attribute declarations in PL/SQL to access a row will not display the invisible column in the output.B、The DESCRIBE commands in SQL *Plus will not display the invisible column in the output.C、Referential integrity constraint cannot be set on the invisible column.D、The invisible column cannot be made visible and can only be marked as unused.E、A primary key constraint can be added on the invisible column.

考题 Evaluate the following statements:   CREATE TABLE purchase_orders (po_id NUMBER(4),  po_date TIMESTAMP, supplier_id NUMBER(6), po_total NUMBER(8,2),  CONSTRAINT order_pk PRIMARY KEY(po_id)) PARTITION BY RANGE(po_date)  (PARTITION Q1 VALUES LESS THAN (TO_DATE(?1-apr-2007?d-mon-yyyy?), PARTITION Q2 VALUES LESS THAN  (TO_DATE(?1-jul-2007?d-mon-yyyy?),  PARTITION Q3 VALUES LESS THAN(TO_DATE(?1-oct - 2007?d-mon-yyyy?), PARTITION Q4 VALUES LESS THAN (TO_DATE(?1-jan-2008?d-mon-yyyy?));  CREATE TABLE purchase_order_items (po_id NUMBER(4) NOT NULL, product_id NUMBER(6) NOT NULL, unit_price NUMBER(8,2), quantity NUMBER(8), CONSTRAINT po_items_fk FOREIGN KEY  (po_id) REFERENCES purchase_orders(po_id)) PARTITION BY REFERENCE(po_items_fk);   What are the two consequences of the above statements?()A、 Partitions of PURCHASE_ORDER_ITEMS have system-generated names.B、 Both PURCHASE_ORDERS and PURCHASE_ORDER_ITEMS tables are created with four partitions each. C、 Partitions of the PURCHASE_ORDER_ITEMS table exist in the same tablespaces as the partitions of the PURCHASE_ORDERS table.D、 The PURCHASE_ORDER_ITEMS table inherits the partitioning key from the parent table by automatically duplicating the key columns.E、 Partition maintenance operations performed on the PURCHASE_ORDER_ITEMS table are automatically reflected in the PURCHASE_ORDERS table.

考题 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 orderto populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true? ()A、You cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.B、The EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID column.C、The EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.D、Any other column of NUMBER data type in your schema can use the EMP_ID_SEQ sequence.E、The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES table.F、The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEE_ID column.

考题 Which SQL statement defines a FOREIGN KEY constraint on the DEPTNO column of the EMP table?()A、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);B、CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));C、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));D、CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

考题 Evaluate the following SQL statement used to create the PRODUCTS table:   CREATE TABLE products (product_id NUMBER(3) PRIMARY KEY, product_desc VARCHAR2(25), qtyNUMBER(8,2), rate NUMBER(10,2), total_value AS ( qty * rate)) PARTITION BY RANGE (total_value) (PARTITION p1 VALUES LESS THAN (100000), PARTITION p2 VALUES LESS THAN  (150000), PARTITION p3 VALUES LESS THAN (MAXVALUE))  COMPRESS FOR ALL OPERATIONS;   Which statement is true regarding this command?()  A、 It executes successfully but partition pruning cannot happen for this partition key.B、 It produces an error because the TOTAL_VALUE column cannot be used as a partition key.C、 It produces an error because compression cannot be used for the TOTAL_VALUE partition key. D、 It executes successfully but the values in the TOTAL_VALUE column would not be physically stored in the partitions.

考题 Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()A、SER_NOB、ORDER_IDC、STATUSD、PROD_IDE、ORD_TOTALF、composite index on ORDER_ID and ORDER_DATE

考题 单选题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 command that is used to create a table: SQL CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER (6), oamtNUMBER(10,2)) TABLESPACE users; Which two statements are true about the effect of the above command()AA CHECK constraint is created on the OID column.BA NOT NULL constraint is created on the OID column.CThe ORDERS table is the only object created in the USERS tablespace.DThe ORDERS table and a unique index are created in the USERS tablespace.EThe ORDERS table is created in the USERS tablespace and a unique index is created on the OID columnin the SYSTEM tablespace.

考题 单选题评估此CREATE TABLE语句的执行结果: CREATE TABLE part( part_id NUMBER, part_name VARCHAR2(25), manufacturer_id NUMBER(9), retail_price NUMBER(7,2) NOT NULL, CONSTRAINT part_id_pk PRIMARY KEY(part_id), CONSTRAINT cost_nn NOT NULL(cost), CONSTRAINT FOREIGN KEY (manufacturer_id) REFERENCES manufacturer(id)); 哪一行会导致产生错误()A 6B 7C 8D 9

考题 多选题Examine the command that is used to create a table:  SQL CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER(6), oamt NUMBER(10,2)) TABLESPACE users;  Which two statements are true about the effect of the above command) ()AA CHECK constraint is created on the OID column.BA NOT NULL constraint is created on the OID column.CThe ORDERS table is the only object created in the USERS tablespace.DThe ORDERS table and a unique index are created in the USERS tablespace.EThe ORDERS table is created in the USERS tablespace and a unique index is created on the OIDcolumn in the SYSTEM tablespace.

考题 多选题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 SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()ASER_NOBORDER_IDCSTATUSDPROD_IDEORD_TOTALFcomposite index on ORDER_ID and ORDER_DATE

考题 多选题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 SQL statements that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL STATUS VARCHARD2(10) CHECK (status IN ('CREDIT','CASH')), PROD_ID_NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order id, order date)); For which columns would an index be automatically created when you execute the aboveSQL statement? ()ASER_NOBORDER_IDCSTATUSDPROD_IDEORD_TOTALFComposite index on ORDER_ID and ORDER_DATE

考题 多选题Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()ASER_NOBORDER_IDCSTATUSDPROD_IDEORD_TOTALFcomposite index on ORDER_ID and ORDER_DATE

考题 单选题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?()A To find the tax percentage for each of the employees.B To list the name, job id, and manager name for all the employees.C To find the name, salary, and department name of employees who are not working with Smith.D To find the number of employees working for the Administrative department and earning less then 4000.E To display name, salary, manager ID, and department name of all the employees, even if the employees do not have a department ID assigned.