Which statement is true regarding the above command?

View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables.


The PROD_ID column is the foreign key in the SALES tables, which references the PRODUCTS table.
Similarly, the CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively.
Evaluate the following CREATE TABLE 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 regarding the above command?
A. The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified columns would be passed to the new table.
B. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
C. The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
D. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the specified columns would be passed to the new table.

Download Printable PDF. VALID exam to help you PASS.

2 thoughts on “Which statement is true regarding the above command?

  1. (TRUE) A. The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified columns would be passed to the new table.

    (FALSE) B. The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
    -> DEFAULT don’t matter, they will be set with sysdate if they are set to null

    (FALSE) C. The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
    -> The columns match in yours datatypes, the column name could be different

    (FALSE) D. The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the specified columns would be passed to the new table.
    -> The constraints don’t passed to new table, just values

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.