Black Friday Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Oracle 1z0-071 Based on Real Exam Environment

Page: 10 / 24
Total 326 questions

Oracle Database 12c SQL Questions and Answers

Question 37

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, I cust_id, order_date DEFAULT SYSDATE)

AS SELECT I prod_id,cust_id,time_id FROM sales.

Which statement is true regarding the above command?

Options:

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.

C.

The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause I 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

Question 38

Which three are true?

Options:

A.

LAST_DAY returns the date of the last day of the current ,month onlyu.

B.

CEIL requires an argument which is a numeric data type.

C.

ADD_MONTHS adds a number of calendar months to a date.

D.

ADD_MONTHS works with a character string that can be implicitlyt converted to a DATE data type.

E.

LAST_DAY return the date of the last day the previous month only.

F.

CEIL returns the largest integer less than or equal to a specified number.

G.

LAST_DAY returns the date of the last day of the month for the date argument passed to the function.

Question 39

Table ORDER_ITEMS contains columns ORDER_ID, UNIT_PRICE and QUANTITY, of data type NUMBER

Statement 1:

SELECT MAX (unit price*quantity) "Maximum Order FROM order items;

Statement 2:

SELECT MAX (unit price*quantity "Maximum order" FROM order items GROUP BY order id;

Which two statements are true?

Options:

A.

Statement 2 returns only one row of output.

B.

Both the statement given the same output.

C.

Both statements will return NULL if either UNIT PRICE or QUANTITY contains NULL,

D.

Statement 2 may return multiple rows of output.

E.

Statement 1 returns only one row of output.

Question 40

Which two statements are true about * TABLES views?

Options:

A.

You must have SELECT privileges on a table to view it in ALL TABLES.

B.

You must have SELECT privileges on a table to view it in DBA TABLES.

C.

USER TABLES displays all tables owned by the current user.

D.

All TABLES displays all tables owned by the current user.

E.

You must have SELECT privileges on a table to view it in USER TABLES.

F.

All users can query DBA TABLES successfully.

Page: 10 / 24
Total 326 questions