1Z0-051 | Up to the immediate present 1Z0-051 Exam Study Guides With New Update Exam Questions


Q81. - (Topic 1) 

View the Exhibit for the structure of the STUDENT and FACULTY tables. 

You need to display the faculty name followed by the number of students handled by the faculty at the base location. Examine the following two SQL statements: 

Which statement is true regarding the outcome? 

A. Only statement 1 executes successfully and gives the required result. 

B. Only statement 2 executes successfully and gives the required result. 

C. Both statements 1 and 2 execute successfully and give different results. 

D. Both statements 1 and 2 execute successfully and give the same required result. 

Answer:

Q82. - (Topic 1) 

Which statement is true regarding the UNION operator? 

A. The number of columns selected in all SELECT statements need to be the same 

B. Names of all columns must be identical across all SELECT statements 

C. By default, the output is not sorted 

D. NULL values are not ignored during duplicate checking 

Answer:

Explanation: 

The SQL UNION query allows you to combine the result sets of two or more SQL SELECT statements. It removes duplicate rows between the various SELECT statements. Each SQL SELECT statement within the UNION query must have the same number of fields in the result sets with similar data types. 

Q83. - (Topic 1) 

Which is an iSQL*Plus command? 

A. INSERT 

B. UPDATE 

C. SELECT 

D. DESCRIBE 

E. DELETE 

F. RENAME 

Answer:

Explanation: Explanation: 

The only SQL*Plus command in this list: DESCRIBE. It cannot be used as SQL command. 

This command returns a description of tablename, including all columns in that table, the 

datatype for each column and an indication of whether the column permits storage of NULL 

values. 

Incorrect Answer: 

A INSERT is not a SQL*PLUS command 

B UPDATE is not a SQL*PLUS command 

C SELECT is not a SQL*PLUS command 

E DELETE is not a SQL*PLUS command 

F RENAME is not a SQL*PLUS command 

Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 7 

Q84. - (Topic 1) 

Which statement correctly describes SQL and /SQL*Plus? 

A. Both SQL and /SQL*plus allow manipulation of values in the database. 

B. /SQL*Plus recognizes SQL statements and sends them to the server; SQL is the Oracle proprietary interface for executing SQL statements. 

C. /SQL*Plus is a language for communicating with the Oracle server to access data; SQL recognizes SQL statements and sends them to the server. 

D. SQL manipulates data and table definitions in the database; /SQL*Plus does not allow manipulation of values in the database. 

Answer:

Q85. - (Topic 1) 

You need to create a table with the following column specifications: 

1. 

Employee ID (numeric data type) for each employee 

2. 

Employee Name (character data type) that stores the employee name 

3. 

Hire date, which stores the date of joining the organization for each employee 

4. 

Status (character data type), that contains the value 'ACTIVE' if no data is entered 

5. 

Resume (character large object [CLOB] data type), which contains the resume submitted by the employee 

Which is the correct syntax to create this table? 

A. CREATE TABLE EMP_1 

(emp_id NUMBER(4), 

emp_name VARCHAR2(25), 

start_date DATE, 

e_status VARCHAR2(10) DEFAULT 'ACTIVE', 

resume CLOB(200)); 

B. CREATE TABLE 1_EMP 

(emp_id NUMBER(4), 

emp_name VARCHAR2(25), 

start_date DATE, 

emp_status VARCHAR2(10) DEFAULT 'ACTIVE', 

resume CLOB); 

C. CREATE TABLE EMP_1 

(emp_id NUMBER(4), 

emp_name VARCHAR2(25), 

start_date DATE, 

emp_status VARCHAR2(10) DEFAULT "ACTIVE", 

resume CLOB); 

D. CREATE TABLE EMP_1 

(emp_id NUMBER, 

emp_name VARCHAR2(25), 

start_date DATE, 

emp_status VARCHAR2(10) DEFAULT 'ACTIVE', 

resume CLOB); 

Answer:

Explanation: 

CLOB Character data (up to 4 GB) 

NUMBER [(p,s)] Number having precision p and scale s (Precision is the total number of 

decimal digits and scale is the number of digits to the right of the decimal point; precision 

can range from 1 to 38, and scale can range from –84 to 127.) 

Q86. - (Topic 2) 

View the Exhibit and examine the data in the PROMOTIONS table. 

PROMO_BEGIN_DATE is stored in the default date format, dd-mon-rr. 

You need to produce a report that provides the name, cost, and start date of all promos in the POST category that were launched before January 1, 2000. 

Which SQL statement would you use? 

A. SELECT promo_name, promo_cost, promo_begin_date FROM promotions WHERE promo_category = 'post' AND promo_begin_date < '01-01-00' 

B. SELECT promo_name, promo_cost, promo_begin_date FROM promotions WHERE promo_cost LIKE 'post%' AND promo_begin_date < '01-01-2000' 

C. SELECT promo_name, promo_cost, promo_begin_date FROM promotions WHERE promo_category LIKE 'P%' AND promo_begin_date < '1-JANUARY-00' 

D. SELECT promo_name, promo_cost, promo_begin_date FROM promotions WHERE promo_category LIKE '%post%' AND promo_begin_date < '1-JAN-00' 

Answer:

Q87. - (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. Main query and sub query can get data from different tables 

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

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

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

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

Answer: A,B,C 

Q88. - (Topic 2) 

Which tasks can be performed using SQL functions that are built into Oracle database? (Choose three.) 

A. finding the remainder of a division 

B. adding a number to a date for a resultant date value 

C. comparing two expressions to check whether they are equal 

D. checking whether a specified character exists in a given string 

E. removing trailing, leading, and embedded characters from a character string 

Answer: A,C,D 

Q89. - (Topic 2) 

Examine the following SQL commands: 

Which statement is true regarding the execution of the above SQL commands? 

A. Both commands execute successfully. 

B. The first CREATE TABLE command generates an error because the NULL constraint is not valid. 

C. The second CREATE TABLE command generates an error because the CHECK constraint is not valid. 

D. The first CREATE TABLE command generates an error because CHECK and PRIMARY KEY constraints cannot be used for the same column. 

E. The first CREATE TABLE command generates an error because the column PROD_ID cannot be used in the PRIMARY KEY and FOREIGN KEY constraints. 

Answer:

Explanation: 

Defining Constraints The slide gives the syntax for defining constraints when creating a table. You can create 

constraints at either the column level or table level. Constraints defined at the column level 

are included when the column is defined. Table-level constraints are defined at the end of 

the table definition and must refer to the column or columns on which the constraint 

pertains in a set of parentheses. It is mainly the syntax that differentiates the two; 

otherwise, functionally, a columnlevel constraint is the same as a table-level constraint. 

NOT NULL constraints must be defined at the column level. 

Constraints that apply to more than one column must be defined at the table level. 

Q90. - (Topic 1) 

The STUDENT_GRADES table has these columns: 

STUDENT_IDNUMBER(12) 

SEMESTER_ENDDATE 

GPANUMBER(4,3) 

The registrar has asked for a report on the average grade point average (GPA), sorted from the highest grade point average to each semester, starting from the earliest date. 

Which statement accomplish this? 

A. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end DESC, gpa DESC; 

B. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY semester_end, gpa ASC 

C. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end ASC; 

D. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end DESC; 

E. 

SELECT student_id, semester_end, gpa FROM student_grades ORDER BY gpa DESC, semester_end ASC; 

F. 

SELECT student_id,semester_end,gpa FROM student_grades ORDER BY semester_end,gpa DESC 

Answer: