单选题Evaluate the CREATE TABLE statement:   CREATE TABLE products   (product_id NUMBER (6)  CONSTRAINT prod_id_pk PRIMARY KEY,  product_name VARCHAR2 (15));   Which statement is true regarding the PROD_ID_PK constraint?()A  It would be created only if a uni

题目
单选题
Evaluate the CREATE TABLE statement:   CREATE TABLE products   (product_id NUMBER (6)  CONSTRAINT prod_id_pk PRIMARY KEY,  product_name VARCHAR2 (15));   Which statement is true regarding the PROD_ID_PK constraint?()
A

 It would be created only if a unique index is manually created first.

B

 It would be created and would use an automatically created unique index.

C

 It would be created and would use an automatically created nonunique index.

D

 It would be created and remains in a disabled state because no index is specified in the command.

参考答案和解析
正确答案: A
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You executed the following code:   SQL> CREATE TABLE COUNTRY   (COUNTRY_ID CHAR(2) CONSTRAINT COUNTRY_ID_nn NOT NULL,   COUNTRY_NAME VARCHAR2(20),   CURRENCY_NAME VARCHAR2(20),   CONSTRAINT COUNTRY_ID_PK PRIMARY KEY (COUNTRY_ID))   ORGANIZATION INDEX;   In which tablespace will the mapping table be created?()

  • A、 SYSTEM tablespace
  • B、 SYSAUX tablespace
  • C、 Undo tablespace
  • D、 The tablespace of the Index Organized Table (IOT)

正确答案:D

第2题:

Evaluate the CREATE TABLE statement:   CREATE TABLE products   (product_id NUMBER (6)  CONSTRAINT prod_id_pk PRIMARY KEY,  product_name VARCHAR2 (15));   Which statement is true regarding the PROD_ID_PK constraint?()

  • A、 It would be created only if a unique index is manually created first.
  • B、 It would be created and would use an automatically created unique index.
  • C、 It would be created and would use an automatically created nonunique index.
  • D、 It would be created and remains in a disabled state because no index is specified in the command.

正确答案:B

第3题:

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));


参考答案:B

第4题:

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.

正确答案:B,D

第5题:

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.

正确答案:D,E

第6题:

数据库中的中的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)deferrabl
  • C、以上两者都是

正确答案:B

第7题:

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_NO
  • B、ORDER_ID
  • C、STATUS
  • D、PROD_ID
  • E、ORD_TOTAL
  • F、composite index on ORDER_ID and ORDER_DATE

正确答案:A,F

第8题:

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.

正确答案:B,D

第9题:

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));

正确答案:B

第10题:

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);

正确答案:C

更多相关问题