1Z0-051 | 10 Tips For Renew 1Z0-051 vce


Q151. - (Topic 2) 

View the Exhibit and examine the structure of the CUSTOMERS table. 

You want to generate a report showing the last names and credit limits of all customers 

whose last names start with A, B, or C, and credit limit is below 10, 000. 

Evaluate the following two queries: 

Which statement is true regarding the execution of the above queries? 

A. Only the first query gives the correct result. 

B. Only the second query gives the correct result. 

C. Both execute successfully and give the same result. 

D. Both execute successfully but do not give the required result. 

Answer:

Q152. - (Topic 1) 

View the Exhibit and examine the description for the CUSTOMERS table. 

You want to update the CUST_CREDIT_LIMIT column to NULL for all the customers, where 

CUST_INCOME_LEVEL has NULL in the CUSTOMERS table. Which SQL statement will accomplish the task? 

A. 

UPDATE customers SET cust_credit_limit = NULL WHERE CUST_INCOME_LEVEL = NULL; 

B. 

UPDATE customers SET cust_credit_limit = NULL WHERE cust_income_level IS NULL; 

C. 

UPDATE customers 

SET cust_credit_limit = TO_NUMBER(NULL) 

WHERE cust_income_level = TO_NUMBER(NULL); 

D. 

UPDATE customers 

SET cust_credit_limit = TO_NUMBER(' ',9999) 

WHERE cust_income_level IS NULL; 

Answer:

Q153. - (Topic 1) 

You need to perform these tasks: 

. Create and assign a MANAGER role to Blake and Clark . Grant CREATE TABLE and CREATE VIEW privileges to Blake and Clark 

Which set of SQL statements achieves the desired results? 

A. CREATE ROLE manager; 

GRANT create table, create view 

TO manager; 

GRANT manager TO BLAKE,CLARK; 

B. CREATE ROLE manager; 

GRANT create table, create voew 

TO manager; 

GRANT manager ROLE TO BLAKE,CLARK; 

C. GRANT manager ROLE TO BLAKE,CLARK; 

GRANT create table, create voew 

TO BLAKE CLARK; 

***MISSING*** 

Answer:

Explanation: Result of commands: 

Q154. - (Topic 2) 

Which constraint can be defined only at the column level? 

A. UNIQUE 

B. NOT NULL 

C. CHECK 

D. PRIMARY KEY 

E. FOREIGN KEY 

Answer:

Explanation: 

the NOT NULL constraint can be specified only at the column level, not at the table level. 

Incorrect Answer: AUNIQUE can be define at table level CCHECK can be define at table level DPRIMARY KEY can be define at table level EFOREIGN KEY can be define at table level 

Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-8 

New Questions 

Q155. - (Topic 2) 

The EMPLOYEES table has these columns: 

LAST NAMEVARCHAR2(35) SALARYNUMBER(8,2) HIRE_DATEDATE 

Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement: 

ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000); 

What is true about your ALTER statement? 

A. Column definitions cannot be altered to add DEFAULT values. 

B. A change to the DEFAULT value affects only subsequent insertions to the table. 

C. Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type. 

D. All the rows that have a NULL value for the SALARY column will be updated with the value 5000. 

Answer:

Explanation: 

A change to the DEFAULT value affects only subsequent insertions to the table. Existing 

rows will not be affected. 

Incorrect Answers 

A:Column definitions can be altered to add DEFAULT values. 

C:Column definitions can be altered to add DEFAULT values. It works for columns with a 

NUMBER data type also. 

D:A change to the DEFAULT value affects only subsequent insertions to the table. Existing rows will not be affected. 

OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 219-224 Chapter 5: Creating Oracle Database Objects 

Q156. - (Topic 2) 

You want to display the date for the first Monday of the next month and issue the following command: 

SQL>SELECT TO_CHAR(NEXT_DAY(LAST_DAY(SYSDATE),'MON'), 'dd "is the first Monday for"fmmonth rrrr') FROM DUAL; 

What is the outcome? 

A. It executes successfully and returns the correct result. 

B. It executes successfully but does not return the correct result. 

C. It generates an error because TO_CHAR should be replaced with TO_DATE. 

D. It generates an error because rrrr should be replaced by rr in the format string. 

E. It generates an error because fm and double quotation marks should not be used in the format string. 

Answer:

Explanation: 

NEXT_DAY(date, 'char'): Finds the date of the next specified day of the week ('char') following date. The value of char may be a number representing a day or a character string. 

LAST_DAY(date): Finds the date of the last day of the month that contains date The second innermost function is evaluated next. TO_CHAR('28-OCT-2009', 'fmMonth') converts the given date based on the Month format mask and returns the character string October. The fm modifier trims trailing blank spaces from the name of the month. 

Q157. - (Topic 2) 

Which four are attributes of single row functions? (Choose four.) 

A. cannot be nested 

B. manipulate data items 

C. act on each row returned 

D. return one result per row 

E. accept only one argument and return only one value 

F. accept arguments which can be a column or an expression 

Answer: B,C,D,F 

Explanation: 

manipulate data items, act on each row returned, return one result per row, and accept arguments that can be a column or expression. 

Incorrect Answer: Ais not single row attributes Efunctions can accept more than one argument, e.g NVL2 

Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 3-5 

Q158. - (Topic 2) 

What are two reasons to create synonyms? (Choose two.) 

A. You have too many tables. 

B. Your tables names are too long. 

C. Your tables have difficult names. 

D. You want to work on your own tables. 

E. You want to use another schema's tables. 

F. You have too many columns in your tables. 

Answer: B,C 

Explanation: 

Create a synonyms when the names of the tables are too long or the table names are difficult. 

Q159. - (Topic 1) 

Which three statements are true regarding sub queries? (Choose three.) 

A. Multiple columns or expressions can be compared between the main query and sub query 

B. Sub queries can contain GROUP BY and ORDER BY clauses 

C. Only one column or expression can be compared between the main query and subqeury 

D. Main query and sub query can get data from different tables 

E. Main query and sub query must get data from the same tables 

F. Sub queries can contain ORDER BY but not the GROUP BY clause 

Answer: A,B,D 

Q160. - (Topic 1) 

Which arithmetic operations can be performed on a column by using a SQL function that is built into Oracle database? (Choose three.) 

A. addition 

B. subtraction 

C. raising to a power 

D. finding the quotient 

E. finding the lowest value 

Answer: A,C,E