Question ID 4759 | Which CREATE TABLE statement is valid?
|
Option A | A. CREATE TABLE ord_details
(ord_no NUMBER(2),
item_no NUMBER(3),
ord_date DATE DEFAULT NOT NULL), CONSTRAINT ord_uq UNIQUE (ord_no),
CONSTRAINT ord_pk PRIMARY KEY (ord_no));
|
Option B | B. CREATE TABLE ord_details
(ord_no NUMBER(2),
item_no NUMBER(3),
ord_date DATE DEFAULT SYSDATE NOT NULL),
CONSTRAINT ord_pk PRIMARY KEY (ord_no,item_no));
|
Option C | C. CREATE TABLE ord_details (ord_no NUMBER(2) PRIMARY KEY, item_no NUMBER(3) PRIMARY KEY, ord_date DATE NOT NULL);
|
Option D | D. CREATE TABLE ord_details
(ord_no NUMBER(2) UNIQUE, NOT NULL,
item_no NUMBER(3),
ord_date DATE DEFAULT SYSDATE NOT NULL);
|
Correct Answer | B |
Question ID 4760 | See the exhibit and examine the structure of the CUSTOMERS and GRADES tables:
Exhibit:
You need to display names and grades of customers who have the highest credit limit. Which two SQL statements would accomplish the task? (Choose two.)
|
Option A | A. SELECT custname, grade
FROM customers, grades
WHERE cust_credit_limit = (SELECT MAX(cust_credit_limit)
FROM customers)
AND cust_credit_limit BETWEEN startval AND endval;
|
Option B | B. SELECT custname, grade
FROM customers, grades
WHERE cust_credit_limit IN (SELECT MAX(cust_credit_limit)
FROM customers)
AND MAX(cust_credit_limit) BETWEEN startval AND endval;
|
Option C | C. SELECT custname, grade
FROM customers, grades
WHERE (SELECT MAX(cust_credit_limit)
FROM customers) BETWEEN startval and endval AND cust_credit_limit BETWEEN startval AND endval;
|
Option D | D. SELECT custname, grade
FROM customers, grades
WHERE (SELECT MAX(cust_credit_limit)
FROM customers) BETWEEN startval and endval;
|
Correct Answer | A,C |