2025 New 1Z0-051 Exam Dumps with PDF and VCE Free: https://www.2passeasy.com/dumps/1Z0-051/
Proper study guides for 1Z0-051 Oracle Database: SQL Fundamentals I certified begins with 1z0 051 dumps pdf preparation products which designed to deliver the 1z0 051 dumps by making you pass the 1Z0-051 test at your first time. Try the free 1z0 051 practice test right now.
Free 1Z0-051 Demo Online For Microsoft Certifitcation:
NEW QUESTION 1
You work as a database administrator at ABC.com. You study the exhibit carefully. Exhibit 
Using the PROMOTIONS table, you need to display the names of all promos done after
January 1, 2001 starting with the latest promo.
Which query would give the required result? (Choose all that apply.)
- A. SELECT promo_name,promo_begin_date FROM promotions WHERE promo_begin_date > '01-JAN-01' ORDER BY 1 DESC;
- B. SELECT promo_name,promo_begin_date "START DATE" FROM promotions WHERE promo_begin_date > '01-JAN-01' ORDER BY "START DATE" DESC;
- C. SELECT promo_name,promo_begin_date FROM promotions WHERE promo_begin_date > '01-JAN-01' ORDER BY 2 DESC;
- D. SELECT promo_name,promo_begin_date FROM promotions WHERE promo_begin_date > '01-JAN-01' ORDER BY promo_name DESC;
Answer: BC
NEW QUESTION 2
Evaluate the following SQL statement:
SQL> SELECT cust_id, cust_last_name FROM customers WHERE cust_credit_limit IN (select cust_credit_limit FROM customers WHERE cust_city ='Singapore');
Which statement is true regarding the above query if one of the values generated by the subquery is NULL?
- A. It produces an erro
- B. It executes but returns no row
- C. It generates output for NULL as well as the other values produced by the subquer
- D. It ignores the NULL value and generates output for the other values produced by the subquer
Answer: C
NEW QUESTION 3
Examine the structure of the ORDERS table: 
You want to find the total value of all the orders for each year and issue the following command:
SQL>SELECT TO_CHAR(order_date,'rr'), SUM(order_total)
FROM orders
GROUP BY TO_CHAR(order_date,'yyyy');
Which statement is true regarding the outcome?
- A. It executes successfully and gives the correct outpu
- B. It gives an error because the TO_CHAR function is not vali
- C. It executes successfully but does not give the correct outpu
- D. It gives an error because the data type conversion in the SELECT list does not match the data type conversion in the GROUP BY claus
Answer: D
NEW QUESTION 4
Examine the statement:
Create synonym emp for hr.employees;
What happens when you issue the statement?
- A. An error is generate
- B. You will have two identical tables in the HR schema with different name
- C. You create a table called employees in the HR schema based on you EMP tabl
- D. You create an alternative name for the employees table in the HR schema in your own schem
Answer: D
NEW QUESTION 5
You work as a database administrator at ABC.com. You study the exhibit carefully. 
Exhibit:
Which two SQL statements would execute successfully? (Choose two.)
- A. UPDATE promotions SET promo_cost = promo_cost+ 100 WHERE TO_CHAR(promo_end_date, 'yyyy') > '2000';
- B. SELECT promo_begin_date FROM promotions WHERE TO_CHAR(promo_begin_date,'mon dd yy')='jul 01 98';
- C. UPDATE promotions SET promo_cost = promo_cost+ 100 WHERE promo_end_date > TO_DATE(SUBSTR('01-JAN-2000',8));
- D. SELECT TO_CHAR(promo_begin_date,'dd/month') FROM promotions WHERE promo_begin_date IN (TO_DATE('JUN 01 98'), TO_DATE('JUL 01 98'));
Answer: AB
NEW QUESTION 6
View the Exhibit and examine the structures of the EMPLOYEES and DEPARTMENTS tables.
You want to update the EMPLOYEES table as follows:4 ? 4;
-Update only those employees who work in Boston or Seattle (locations 2900 and 2700).
-Set department_id for these employees to the department_id corresponding to London
(location_id 2100).
-Set the employees' salary in location_id 2100 to 1.1 times the average salary of their department.
-Set the employees' commission in location_id 2100 to 1.5 times the average commission of their department.
You issue the following command: SQL>UPDATE employees SET department_id = (SELECT department_id FROM departments WHERE location_id = 2100), (salary, commission) = (SELECT 1.1*AVG(salary), 1.5*AVG(commission) FROM employees, departments WHERE departments.location_id IN(2900,2700,2100)) WHERE department_id IN (SELECT department_id FROM departments WHERE location_id = 2900 OR location_id = 2700)
What is the outcome?
- A. It executes successfully and gives the correct resul
- B. It executes successfully but does not give the correct resul
- C. It generates an error because a subquery cannot have a join condition in an UPDATE statemen
- D. It generates an error because multiple columns (SALARY, COMMISION) cannot be specified together in an UPDATE statemen
Answer: B
NEW QUESTION 7
Which is an iSQL*Plus command?
- A. INSERT
- B. UPDATE
- C. SELECT
- D. DESCRIBE
- E. DELETE
- F. RENAME
Answer: D
Explanation: Explanation: The only SQL*Plus command in this list : DESCRIBE. It cannot be used as SQL command. This command returns a description of table name, 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
NEW QUESTION 8
Evaluate the following CREATE SEQUENCE statement:
CREATE SEQUENCE seq1
START WITH 100
INCREMENT BY 10
MAXVALUE 200
CYCLE
NOCACHE;
The SEQ1 sequence has generated numbers up to the maximum limit of 200. You issue the following SQL statement:
SELECT seq1.nextval FROM dual;
What is displayed by the SELECT statement?
- A. 1
- B. 10
- C. 100
- D. an error
Answer: A
Explanation:
But why the answer is not "C" ? Because you didn't specify the MINVALUE for the sequence. If you check the sequence definition that you created it will have the default value of 1, which it reverts to when cycling. If you wanted to keep the minimum value you would need to specify it in the sequence creation. sequence Is the name of the sequence generator INCREMENT BY n Specifies the interval between sequence numbers, where n is an integer (If this clause is omitted, the sequence increments by 1.) START WITH n Specifies the first sequence number to be generated (If this clause is omitted, the sequence starts with 1.) MAXVALUE n Specifies the maximum value the sequence can generate NOMAXVALUE Specifies a maximum value of 10^27 for an ascending sequence and –1 for a descending sequence (This is the default option.) MINVALUE n Specifies the minimum sequence value NOMINVALUE Specifies a minimum value of 1 for an ascending sequence and –(10^26) for a descending sequence (This is the default option.)
CYCLE | NOCYCLE Specifies whether the sequence continues to generate values after reaching its maximum or minimum value (NOCYCLE is the default option.) CACHE n | NOCACHE Specifies how many values the Oracle server preallocates and keeps in memory (By default, the Oracle server caches 20 values.)
NEW QUESTION 9
Which two statements are true regarding constraints? (Choose two.)
- A. A constraint can be disabled even if the constraint column contains data
- B. A constraint is enforced only for the INSERT operation on a table
- C. A foreign key cannot contain NULL values
- D. All constraints can be defined at the column level as well as the table level
- E. A columns with the UNIQUE constraint can contain NULL values
Answer: AE
NEW QUESTION 10
Which substitution variable would you use if you want to reuse the variable without prompting the user each time?
- A. &
- B. ACCEPT
- C. PROMPT
- D. &&
Answer: D
Explanation:
To reuse the variable without prompting the user each time you can use && substitution
variable.
Incorrect Answers
A:This substitution variable will prompt the user each time.
B:ACCEPT is command, not substitution variable. It used to define more accurate or
specific prompt or when you want more output to display as the values are defined.
C:PROMPT is part of the ACCEPT command, it is not a variable.
OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 165-173
Chapter 4: Sub queries
NEW QUESTION 11
Using the CUSTOMERS table, you need to generate a report that shows 50% of each credit amount in each income level. The report should NOT show any repeated credit amounts in each income level. Which query would give the required result?
- A. SELECT cust_income_level, DISTINCT cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;
- B. SELECT DISTINCT cust_income_level, DISTINCT cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;
- C. SELECT DISTINCT cust_income_level ' ' cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;
- D. SELECT cust_income_level ' ' cust_credit_limit * 0.50 AS "50% Credit Limit" FROM customers;
Answer: C
Explanation: Duplicate Rows Unless you indicate otherwise, SQL displays the results of a query without eliminating the duplicate rows. To eliminate duplicate rows in the result, include the DISTINCT keyword in the SELECT clause immediately after the SELECT keyword. You can specify multiple columns after the DISTINCT qualifier. The DISTINCT qualifier affects all the selected columns, and the result is every distinct combination of the columns.
NEW QUESTION 12
Which two statements complete a transaction? (Choose two)
- A. DELETE employees;
- B. DESCRIBE employees;
- C. ROLLBACK TO SAVEPOINT C;
- D. GRANT SELECT ON employees TO SCOTT;
- E. ALTER TABLE employeesSET UNUSED COLUMN sal;
- F. Select MAX(sal)FROM employeesWHERE department_id = 20;
Answer: DE
Explanation:
D: GRANT is a DML operation which will cause an implicit commit
E: It is important to understand that an implicit COMMIT occurs on the database when a user exits SQL*Plus or issues a data-definition language (DDL) command such as a CREATE TABLE statement, used to create a database object, or an ALTER TABLE statement, used to alter a database object.
Incorrect Answers A:The DELETE command is data-manipulation language (DML) command and it does not complete a transaction. B:The DESCRIBE command is internal SQL*Plus command and it has nothing to do with completion a transaction.
C: ROLLBACK is not used to commit or complete a transaction, it is used to undo a transaction F:SELECT command is used to retrieve data. It does not complete a transaction.
OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 281-282 Chapter 3: Advanced Data Selection in Oracle
NEW QUESTION 13
Which statement is true regarding the COALESCE function?
- A. It can have a maximum of five expressions in a lis
- B. It returns the highest NOT NULL value in the list for all row
- C. It requires that all expressions in the list must be of the same data typ
- D. It requires that at least one of the expressions in the list must have a NOT NULL valu
Answer: C
Explanation:
The COALESCE Function The COALESCE function returns the first nonnull value from its parameter list. If all its parameters are null, then null is returned. The COALESCE function takes two mandatory parameters and any number of optional parameters. The syntax is COALESCE(expr1, expr2,…,exprn), where expr1 is returned if it is not null, else expr2 if it is not null, and so on. COALESCE is a general form of the NVL function, as the following two equations illustrate: COALESCE(expr1,expr2) = NVL(expr1,expr2) COALESCE(expr1,expr2,expr3) = NVL(expr1,NVL(expr2,expr3)) The data type COALESCE returns if a not null value is found is the same as that of the first not null parameter. To avoid an “ORA-00932: inconsistent data types” error, all not null parameters must have data types compatible with the first not null parameter.
NEW QUESTION 14
Evaluate the following SQL statements: Exhibit: 
Exhibit: 
The above command fails when executed. What could be the reason?
- A. The BETWEEN clause cannot be used for the CHECK constraint
- B. SYSDATE cannot be used with the CHECK constraint
- C. ORD_NO and ITEM_NO cannot be used as a composite primary key because ORD_NO is also the FOREIGN KEY
- D. The CHECK constraint cannot be placed on columns having the DATE data type
Answer: B
Explanation:
CHECK Constraint The CHECK constraint defines a condition that each row must satisfy. The condition can use the same constructs as the query conditions, with the following exceptions: References to the CURRVAL, NEXTVAL, LEVEL, and ROWNUM pseudocolumns Calls to SYSDATE, UID, USER, and USERENV functions Queries that refer to other values in other rows A single column can have multiple CHECK constraints that refer to the column in its definition. There is no limit to the number of CHECK constraints that you can define on a column. CHECK constraints can be defined at the column level or table level. CREATE TABLE employees (... salary NUMBER(8,2) CONSTRAINT emp_salary_min CHECK (salary > 0),
NEW QUESTION 15
You need to display the date ll-oct-2007 in words as "Eleventh of October, Two Thousand Seven'. Which SQL statement would give the required result?
- A. SELECT TO_CHAR('ll-oct-2007'. 'miDdspth "of Mont
- B. Year') FROM DUAL:
- C. SELECT TO_CHAR(TO_DATE('ll-oct-2007'X 'miDdspth of month, year') FROM DUAL;
- D. SELECT TO_CHAR(TO_DATE('ll-oct-2007'), 'miDdthsp "of* Mont
- E. Year') FROM DUAL;
- F. SELECT TO_DATE(TO_CHAR('ll-oct-20077fiiiDdspth "of" Mont
- G. Year')) FROM DUAL:
Answer: A
NEW QUESTION 16
Which SQL statement accepts user input for the columns to be displayed, the table name, and WHERE condition?
- A. SELECT &1, "&2" FROM &3 WHERE last_name = '&4';
- B. SELECT &1, '&2' FROM &3 WHERE '&last_name = '&4' ';
- C. SELECT &1, &2 FROM &3 WHERE last_name = '&4';
- D. SELECT &1, '&2' FROM EMP WHERE last_name = '&4';
Answer: C
Explanation:
In a WHERE clause, date and characters values must be enclosed within single quotation marks.
Sample of the correct syntax
SELECT EMPLOYEE_ID, &COLUMN_NAME FROM EMPLOYEES
Incorrect Answers :
A. Incorrect use of " symbol
B. Incorrect use of ' symbol
D. No input for table name as EMP has been use in the statement.
Refer: Introduction to Oracle9i: SQL, Oracle University Student Guide, Producing Readable Output with iSQL*PLUS, p. 7-8
NEW QUESTION 17
Which two statements are true regarding subqueries? (Choose two.)
- A. A subquery can retrieve zero or more row
- B. Only two subqueries can be placed at one leve
- C. A subquery can be used only in SQL query statement
- D. A subquery can appear on either side of a comparison operato
- E. There is no limit on the number of subquery levels in the WHERE clause of a SELECT statemen
Answer: AD
Explanation:
Using a Subquery to Solve a Problem Suppose you want to write a query to find out who earns a salary greater than Abel’s salary. To solve this problem, you need two queries: one to find how much Abel earns, and a second query to find who earns more than that amount. You can solve this problem by combining the two queries, placing one query inside the other query. The inner query (or subquery) returns a value that is used by the outer query (or main query). Using a subquery is equivalent to performing two sequential queries and using the result of the first query as the search value in the second query. Subquery Syntax A subquery is a SELECT statement that is embedded in the clause of another SELECT statement. You can build powerful statements out of simple ones by using subqueries. They can be very useful when you need to select rows from a table with a condition that depends on the data in the table itself. You can place the subquery in a number of SQL clauses, including the following: WHERE clause HAVING clause FROM clause In the syntax: operator includes a comparison condition such as >, =, or IN Note: Comparison conditions fall into two classes: single-row operators (>, =, >=, <, <>, <=) and multiple-row operators (IN, ANY, ALL, EXISTS). The subquery is often referred to as a nested SELECT, sub-SELECT, or inner SELECT statement. The subquery generally executes first, and its output is used to complete the query condition for the main (or outer) query. Guidelines for Using Subqueries Enclose subqueries in parentheses. Place subqueries on the right side of the comparison condition for readability. (However, the subquery can appear on either side of the comparison operator.) Use single-row operators with single-row subqueries and multiple-row operators with multiple-row subqueries.
Subqueries can be nested to an unlimited depth in a FROM clause but to “only” 255 levels in a WHERE clause. They can be used in the SELECT list and in the FROM, WHERE, and HAVING clauses of a query.
NEW QUESTION 18
Which are iSQL*Plus commands? (Choose all that apply.)
- A. INSERT
- B. UPDATE
- C. SELECT
- D. DESCRIBE
- E. DELETE
- F. RENAME
Answer: D
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
Recommend!! Get the Full 1Z0-051 dumps in VCE and PDF From Certstest, Welcome to Download: https://www.certstest.com/dumps/1Z0-051/ (New 292 Q&As Version)