1z0-047 | A Review Of Printable 1z0-047 vce


Q111. View the Exhibit and examine the ORDERS table. 

The ORDERS table contains data and all orders have been assigned a customer ID. Which statement would add a NOT NULL constraint to the CUSTOMER_ID column? 

A. ALTER TABLE orders 

ADD CONSTRAINT orders_cust_id_nn NOT NULL (customer_id); 

B. ALTER TABLE orders 

MODIFY customer_id CONSTRAINT orders_cust_id_nn NOT NULL; 

C. ALTER TABLE orders 

MODIFY CONSTRAINT orders_cust_id_nn NOT NULL (customer_id); 

D. ALTER TABLE orders 

ADD customer_id NUMBER(6)CONSTRAINT orders_cust_id_nn NOT NULL; 

Answer: B

Q112. View the Exhibit and examine the description of the ORDER_ITEMS and 

PRODUCT_INFORMATION tables. 

The ORDER_ITEM table has records pertaining to details for each product in an order. The 

PRODUCT_INFORMATION table has records for all the products available for ordering. 

Evaluate the following SOL statement: 

SELECT oi.order_id, pi.product_id 

FROM orderjtems oi RIGHT OUTER JOIN product_information pi 

ON (oi. product_id=pi. Product_id); 

Which statement is true regarding the output of this SOL statement? 

A. The query would return the ORDER_ID and PRODUCT_ID for only those products that are ordered. 

B. The query would return the ORDER_ID and PRODUCT_ID for the products that are ordered as well as for the products that have never been ordered. 

C. The query would return the ORDER_ID and PRODUCT_ID for the products that are ordered but not listed in the PRODUCT_INFORMATION table. 

D. The query would return the ORDER_ID and PRODUCT_ID for those products that are ordered as well as for the products that have never been ordered, and for the products that are not listed in the PRODUCT INFORMATION table. 

Answer: B

Q113. Evaluate the SQL statements: 

CREATE TABLE new_order 

(orderno NUMBER(4), 

booking_date TIMESTAMP WITH LOCAL TIME ZONE); 

The database is located in San Francisco where the time zone is -8:00. 

The user is located in New York where the time zone is -5:00. 

A New York user inserts the following record: 

INSERT INTO new_order 

VALUES(1, TIMESTAMP 007-05-10 6:00:00 -5:00"); 

Which statement is true? 

A. When theNewYorkuserselects the row, booking_date is displayed as 007-05-10 3.00.00.000000' 

B. When the New York user selectstherow, booking_date is displayed as 2007-05-10 6.00.00.000000 -5:00'. 

C. WhentheSan Francisco user selectstherow, booking_date is displayed as 007-05-103.00.00.000000' 

D. When the San Francisco user selectstherow,booking_dateis displayed 

as 007-05-103.00.00.000000-8:00' 

Answer: C

Q114. Which two statements are true about the GROUPING function? (Choose two.) 

A. Itis used to find the groups forming the subtotal in a row. 

B. It is used to identify the NULL value in the aggregate functions. 

C. It is used to form the group sets involved in generating the totals and subtotals. 

D. It can only be used with ROLLUP and CUBE operators specified in the GROUP BY clause. 

Answer: A,D

Q115. Evaluate the following DELETE statement: 

DELETE FROM orders; There are no other uncommitted transactions on the ORDERS table. Which statement is true about the DELETE statement? 

A. Itremovesallthe rows in thetable andallows ROLLBACK 

B. It would not removetherows if thetablehasaprimary key. 

C. It removesallthe rows as well as the structure of the table. 

D. Itremoves all the rows inthetable and doesnotallow ROLLBACK 

Answer: A

Q116. View the Exhibit and examine the description of the ORDERS table. 

Evaluate the following SQL statement: 

SELECT order_id, customer_id 

FROM orders 

WHERE order_date > 'June 30 2001' 

Which statement is true regarding the execution of this SQL statement? 

A. It would not execute because 'June 30 2001' in the WHERE condition is not enclosed within double quotation marks. 

B. It would execute and would return ORDER_ID and CUSTOMER_ID for all records having ORDER_DATE greater than 'June 30 2001'. 

C. It would not execute because 'June 30 2001' in the WHERE condition cannot be converted implicitly and needs the use of the TO_DATE conversion function for proper execution. 

D. It would not execute because 'June 30 2001' in the WHERE condition cannot be converted implicitly and needs the use of the TO_CHAR conversion function for proper execution. 

Answer: C

Q117. Evaluate the following ALTER TABLE statement: 

ALTER TABLE orders 

SET UNUSED order_date; 

Which statement is true? 

A. The DESCRIBE command would still display the ORDER_DATE column. 

B. ROLLBACK can be used to get back the ORDER_DATE column in the ORDERS table. 

C. The ORDER_DATE column should be empty for the ALTER TABLE command to execute successfully. 

D. After executing the ALTER TABLE command, you can add a new column called ORDER_DATE to the ORDERS table. 

Answer: D

Q118. Evaluate the following command: 

CREATE TABLE employees 

(employee_id NUMBER(2) PRIMARY KEY, 

last_name VARCHAR2(25) NOT NULL, 

department_id NUMBER(2), job_id VARCHAR2(8), 

salary NUMBER(10,2)); 

You issue the following command to create a view that displays the IDs and last names of the sales staff in the organization: 

CREATE OR REPLACE VIEW sales_staff_vu AS 

SELECT employee_id, last_name job_id 

FROM employees 

WHERE job_id LIKE 'SA_%' WITH CHECK OPTION; 

Which statements are true regarding the above view? (Choose all that apply.) 

A. It allows you to insert details of allnewstaff into the EMPLOYEES table. 

B. Itallowsyou todeletethedetails of the existing sales staff fromtheEMPLOYEES table. 

C. It allows you to updatethejob ids oftheexisting sales staff to any other job id in the EMPLOYEES table. 

D. It allows you to insert the IDs, last names and job ids of the sales staff from theviewif it is used in multitable INSERT statements. 

Answer: BD

Q119. The ORDERS table belongs to the user OE. OE has granted the SELECT privilege on the ORDERS table to the user HR. Which statement would create a synonym ORD so that HR can execute the following query successfully? SELECT'FROM ord; 

A. CREATE SYNONYM ord FOR orders; This command is issuedbyOE. 

B. CREATEPUBLIC SYNONYM ordFORorders; This command is issued by OE. 

C. CREATESYNONYM ord FOR oe.orders; This command isissuedby thedatabaseadministrator. 

D. CREATE PUBLIC SYNONYM ord FOR oe.orders;Thiscommand is issued by the database administrator. 

Answer: D

Q120. View the Exhibit and examine the structure of ORDERS and ORDER_ITEMS tables. 

ORDER__ID is the primary key in the ORDERS table. It is also the foreign key in the ORDER_ITEMS table wherein it is created with the ON DELETE CASCADE option. 

Which DELETE statement would execute successfully? 

A. DELETEorder_id 

FROMorders 

WHEREorder_total< 1000; 

B. DELETEorders 

WHERE order_total < 1000; 

C. DELETE 

FROM orders 

WHERE (SELECTorder_id 

FROM order_items); 

D. DELETE orders o, order_itemsi 

WHEREo.order id = i.order id; 

Answer: B