The safer , easier way to help you pass any IT exams.
Exam : 1Z0-051
Title : Oracle Database: SQL
Fundamentals I
Version : DEMO
1 / 11
The safer , easier way to help you pass any IT exams.
1. 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 table, 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 not get created because the DEFAULT value cannot be specified in the
column definition.
B. 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.
2 / 11
The safer , easier way to help you pass any IT exams.
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.
Answer: B
2. View the Exhibit to examine the description for the SALES table.
Which views can have all DML operations performed on it? (Choose all that apply.)
A. CREATE VIEW v3
AS SELECT * FROM SALES
WHERE cust_id = 2034
WITH CHECK OPTION;
B. CREATE VIEW v1
AS SELECT *