Download Oracle Database 11g SQL Fundamentals I.1z0-051.PracticeDumps.2018-01-09.290q.vcex

Vendor: Oracle
Exam Code: 1z0-051
Exam Name: Oracle Database 11g SQL Fundamentals I
Date: Jan 09, 2018
File Size: 12 MB

How to open VCEX files?

Files with VCEX extension can be opened by ProfExam Simulator.

Demo Questions

Question 1
Evaluate the SQL statement:
TRUNCATE TABLE DEPT; 
Which three are true about the SQL statement? (Choose three.)
  1. It releases the storage space used by the table.
  2. It does not release the storage space used by the table.
  3. You can roll back the deletion of rows after the statement executes.
  4. You can NOT roll back the deletion of rows after the statement executes.
  5. An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an error.
  6. You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT table
Correct answer: ADF
Explanation:
A: The TRUNCATE TABLE Statement releases storage space used by the table,D: Can not rollback the deletion of rows after the statement executes,F: You must be the owner of the table or have DELETE ANY TABLE system privilege to truncate the DEPT table. Incorrect answer:Cis not true Dis not true Eis not true Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 8-18
A: The TRUNCATE TABLE Statement releases storage space used by the table,
D: Can not rollback the deletion of rows after the statement executes,
F: You must be the owner of the table or have DELETE ANY TABLE system privilege to truncate the DEPT table. 
Incorrect answer:
Cis not true 
Dis not true 
Eis not true 
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 8-18
Question 2
You need to design a student registration database that contains several tables storing academic information. 
The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key. 
You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?
  1. CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), 
    CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY students(student_id));
  2. CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), 
    student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id));
  3. CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), 
    CONSTRAINT FOREIGN KEY (student_id) REFERENCES students(student_id));
  4. CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), 
    CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id));
Correct answer: D
Explanation:
CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name (column_name); Incorrect answer:Ainvalid syntax Binvalid syntax Cinvalid syntax   Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-14
CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name (column_name); 
Incorrect answer:
Ainvalid syntax 
Binvalid syntax 
Cinvalid syntax 
  
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-14
Question 3
Here is the structure and data of the CUST_TRANS table:
Exhibit:
CUST_TRANS 
    Name                     Null?                     Type 
--------------           -----------------        ------------------ 
CUSTNO             NOT NULL                CHAR (2) 
TRANSDATE                                       DATE 
TRANSAMT                                         NUMBER (6, 2) 
CUSTNO         TRANSDATE               TRANSAMT 
-------------        -----------------------      ----------------------- 
11                       01-JAN-07                   1000 
22                       01-FEB-07                   2000 
33                       01-MAR-07                  3000 
Dates are stored in the default date format dd-mm-rr in the CUST_TRANS table. 
Which three SQL statements would execute successfully? (Choose three.)
  1. SELECT transdate + '10' FROM cust_trans;
  2. SELECT * FROM cust_trans WHERE transdate = '01-01-07';
  3. SELECT transamt FROM cust_trans WHERE custno > '11';
  4. SELECT * FROM cust_trans WHERE transdate='01-JANUARY-07';
  5. SELECT custno + 'A' FROM cust_trans WHERE transamt > 2000;
Correct answer: ACD
Question 4
See the Exhibit and examine the structure and data in the INVOICE table:
Exhibit:
   
Which two SQL statements would executes successfully? (Choose two.)
  1. SELECT MAX(inv_date),MIN(cust_id) FROM invoice;
  2. SELECT MAX(AVG(SYSDATE - inv_date)) FROM invoice;
  3. SELECT (AVG(inv_date) FROM invoice;
  4. SELECT AVG(inv_date - SYSDATE),AVG(inv_amt) FROM invoice;
Correct answer: AD
Question 5
Which three statements are true regarding sub queries? (Choose three.)
  1. Multiple columns or expressions can be compared between the main query and sub query
  2. Main query and sub query can get data from different tables
  3. Sub queries can contain GROUP BY and ORDER BY clauses
  4. Main query and sub query must get data from the same tables
  5. Sub queries can contain ORDER BY but not the GROUP BY clause
  6. Only one column or expression can be compared between the main query and subqeury
Correct answer: ABC
Question 6
View the Exhibit and examine the structure of the CUSTOMERS table:
    
Using the CUSTOMERS table, you need to generate a report that shows the average credit limit for customers in WASHINGTON and NEW YORK. 
Which SQL statement would produce the required result?
  1. SELECT cust_city, AVG(cust_credit_limit) 
    FROM customers 
    WHERE cust_city IN ('WASHINGTON','NEW YORK') 
    GROUP BY cust_credit_limit, cust_city;
  2. SELECT cust_city, AVG(cust_credit_limit) 
    FROM customers 
    WHERE cust_city IN ('WASHINGTON','NEW YORK') 
    GROUP BY cust_city,cust_credit_limit;
  3. SELECT cust_city, AVG(cust_credit_limit) 
    FROM customers 
    WHERE cust_city IN ('WASHINGTON','NEW YORK') 
    GROUP BY cust_city;
  4. SELECT cust_city, AVG(NVL(cust_credit_limit,0)) 
    FROM customers 
    WHERE cust_city IN ('WASHINGTON','NEW YORK');
Correct answer: C
Explanation:
Creating Groups of Data: GROUP BY Clause SyntaxYou can use the GROUP BY clause to divide the rows in a table into groups. You can then use the group functions to return summary information for each group. In the syntax:group_by_expression Specifies the columns whose values determine the basis for grouping rows Guidelines If you include a group function in a SELECT clause, you cannot select individual results as well, unless the individual column appears in the GROUP BY clause. You receive an error message if you fail to include the column list in the GROUP BY clause. Using a WHERE clause, you can exclude rows before dividing them into groups. You must include the columns in the GROUP BY clause. You cannot use a column alias in the GROUP BY clause.
Creating Groups of Data: GROUP BY Clause Syntax
You can use the GROUP BY clause to divide the rows in a table into groups. You can then use the group functions to return summary information for each group. 
In the syntax:
  • group_by_expression Specifies the columns whose values determine the basis for grouping rows Guidelines 
  • If you include a group function in a SELECT clause, you cannot select individual results as well, unless the individual column appears in the GROUP BY clause. You receive an error message if you fail to include the column list in the GROUP BY clause. 
  • Using a WHERE clause, you can exclude rows before dividing them into groups. 
  • You must include the columns in the GROUP BY clause. 
  • You cannot use a column alias in the GROUP BY clause.
Question 7
Evaluate these two SQL statements:
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC; 
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC; 
What is true about them?
  1. The two statements produce identical results.
  2. The second statement returns a syntax error.
  3. There is no need to specify DESC because the results are sorted in descending order by default.
  4. The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.
Correct answer: A
Explanation:
the two statement produce identical results as ORDER BY 2 will take the second column as sorting column. Incorrect answer:Bthere is no syntax error Cresult are sorted in ascending order by default DORDER BY 2 will take the second column as sorting column. Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 2-22
the two statement produce identical results as ORDER BY 2 will take the second column as sorting column. 
Incorrect answer:
Bthere is no syntax error 
Cresult are sorted in ascending order by default 
DORDER BY 2 will take the second column as sorting column. 
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 2-22
Question 8
Where can sub queries be used? (Choose all that apply)
  1. field names in the SELECT statement
  2. the FROM clause in the SELECT statement
  3. the HAVING clause in the SELECT statement
  4. the GROUP BY clause in the SELECT statement
  5. the WHERE clause in only the SELECT statement
  6. the WHERE clause in SELECT as well as all DML statements
Correct answer: ABCF
Explanation:
SUBQUERIES can be used in the SELECT list and in the FROM, WHERE, and HAVING clauses of a query. A subquery can have any of the usual clauses for selection and projection. The following are required clauses:■ A SELECT list ■ A FROM clause The following are optional clauses:■ WHERE ■ GROUP BY ■ HAVING The subquery (or subqueries) within a statement must be executed before the parent query that calls it, in order that the results of the subquery can be passed to the parent.
SUBQUERIES can be used in the SELECT list and in the FROM, WHERE, and HAVING clauses of a query. 
A subquery can have any of the usual clauses for selection and projection. The following are required clauses:
■ A SELECT list 
■ A FROM clause 
The following are optional clauses:
■ WHERE 
■ GROUP BY 
■ HAVING 
The subquery (or subqueries) within a statement must be executed before the parent query that calls it, in order that the results of the subquery can be passed to the parent.
Question 9
Which three SQL statements would display the value 1890.55 as $1,890.55? (Choose three.)
  1. SELECT TO_CHAR(1890.55,'$99G999D00')FROM DUAL;
  2. SELECT TO_CHAR(1890.55,'$9,999V99')FROM DUAL;
  3. SELECT TO_CHAR(1890.55,'$0G000D00')FROM DUAL;
  4. SELECT TO_CHAR(1890.55,'$99G999D99')FROM DUAL;
  5. SELECT TO_CHAR(1890.55,'$9,999D99')FROM DUAL;
Correct answer: ACD
Question 10
Evaluate the following SQL statement:
   
Which statement is true regarding the outcome of the above query?
  1. It produces an error because the ORDER BY clause should appear only at the end of a compound query-that is, with the last SELECT statement
  2. It executes successfully and displays rows in the descending order of PROMO_CATEGORY
  3. It executes successfully but ignores the ORDER BY clause because it is not located at the end of the compound statement
  4. It produces an error because positional notation cannot be used in the ORDER BY clause with SET operators
Correct answer: A
Explanation:
Using the ORDER BY Clause in Set Operations The ORDER BY clause can appear only once at the end of the compound query. Component queries cannot have individual ORDER BY clauses. The ORDER BY clause recognizes only the columns of the first SELECT query. By default, the first column of the first SELECT query is used to sort the output in an ascending order.
Using the ORDER BY Clause in Set Operations 
The ORDER BY clause can appear only once at the end of the compound query. 
Component queries cannot have individual ORDER BY clauses. 
The ORDER BY clause recognizes only the columns of the first SELECT query. 
By default, the first column of the first SELECT query is used to sort the output in an ascending order.
HOW TO OPEN VCE FILES

Use VCE Exam Simulator to open VCE files
Avanaset

HOW TO OPEN VCEX FILES

Use ProfExam Simulator to open VCEX files
ProfExam Screen

ProfExam
ProfExam at a 20% markdown

You have the opportunity to purchase ProfExam at a 20% reduced price

Get Now!