ExamQuestions.com

Register
Login
Oracle Datbase 12c SQL Exam Questions

Oracle

Oracle Datbase 12c SQL

82 / 120

Question 82:

View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables. 
image
The PROD_ID column is the foreign key in the SALES table referencing the PRODUCTS table. The CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively. Examine this command: CREATE TABLE new_sales (prod_id, cust_id, order_date DEFAULT SYSDATE) AS - SELECT prod_id, cust_id, time_id FROM sales; Which statement is true? 

Answer options:

A. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the selected columns from the SALES table would be created on the corresponding columns in the NEW_SALES table.
B. The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
C. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
D. The NEW_SALES table would get created and all the NOT NULL constraints defined on the selected columns from the SALES table would be created on the corresponding columns in the NEW_SALES table.