1Z0-051 Exam Questions - Online Test


1Z0-051 Premium VCE File

Learn More 100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours

certleader.com

Your success in 1z0 051 dumps is our sole target and we develop all our oracle 1z0 051 in a way that facilitates the attainment of this target. Not only is our 1z0 051 practice test material the best you can find, it is also the most detailed and the most updated. 1z0 051 latest dumps free download pdf for Oracle 1Z0-051 are written to the highest standards of technical accuracy.

Also have 1Z0-051 free dumps questions for you:

NEW QUESTION 1
View the Exhibit and evaluate structures of the SALES, PRODUCTS, and COSTS tables.
1Z0-051 dumps exhibit
Evaluate the following SQL statements:
1Z0-051 dumps exhibit
Which statement is true regarding the above compound query?

  • A. It shows products that have a cost recorded irrespective of sales
  • B. It shows products that were sold and have a cost recorded
  • C. It shows products that were sold but have no cost recorded
  • D. It reduces an error

Answer: C

NEW QUESTION 2
View the Exhibits and examine the structures of the COSTS and PROMOTIONS tables.
1Z0-051 dumps exhibit
Evaluate the following SQL statement:
SQL> SELECT prod_id FROM costs WHERE promo_id IN (SELECT promo_id FROM promotions WHERE promo_cost < ALL (SELECT MAX(promo_cost) FROM promotions GROUP BY (promo_end_datepromo_ begin_date)));
What would be the outcome of the above SQL statement?

  • A. It displays prod IDs in the promo with the lowest cos
  • B. It displays prod IDs in the promos with the lowest cost in the same time interva
  • C. It displays prod IDs in the promos with the highest cost in the same time interva
  • D. It displays prod IDs in the promos with cost less than the highest cost in the same time interva

Answer: D

NEW QUESTION 3
View the Exhibit; e xamine the structure of the PROMOTIONS table.
1Z0-051 dumps exhibit
Each promotion has a duration of at least seven days.
Your manager has asked you to generate a report, which provides the weekly cost for each promotion done to l date.
Which query would achieve the required result?

  • A. SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7 FROM promotions;
  • B. SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7 FROM promotions;
  • C. SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7) FROM promotions;
  • D. SELECT promo_name, promo_cost/((promo_end_date-promo_begin_date)/7) FROM promotions;

Answer: D

NEW QUESTION 4
Evaluate the SQL statement:
SELECT ROUND(45.953, -1), TRUNC(45.936, 2)
FROM dual;
Which values are displayed?

  • A. 46 and 45
  • B. 46 and 45.93
  • C. 50 and 45.93
  • D. 50 and 45.9
  • E. 45 and 45.93
  • F. 45.95 and 45.93

Answer: C

Explanation:
ROUND (45.953,-1) will round value to 1 decimal places to the left. TRUNC (45.936,2) will truncate value to 2 decimal The answer will be 50 and 45.93
Incorrect Answers :
A. Does not meet round and truncate functions
B. Does not meet round functions
D. Does not meet truncate functions
E. Does not meet round functions
F. Does not meet round functions
Refer: Introduction to Oracle9i: SQL, Oracle University Student Guide, Single-Row functions, p. 3-13

NEW QUESTION 5
View the Exhibit and examine the structure of the EMPLOYEES table.
1Z0-051 dumps exhibit
Examine the data in the ENAME and HIREDATE columns of the EMPLOYEES table:
ENAME HIREDATE
SMITH 17-DEC-80 ALLEN 20-FEB-81 WARD 22-FEB-81
You want to generate a list of user IDs as follows: USERID
Smi17DEC80 All20FEB81 War22FEB81
You issue the following query:
SQL>SELECT CONCAT(SUBSTR(INITCAP(ename),1,3), REPLACE(hiredate,'-'))
"USERID"
FROM employees;
What is the outcome?

  • A. It executes successfully and gives the correct outpu
  • B. It executes successfully but does not give the correct outpu
  • C. It generates an error because the REPLACE function is not vali
  • D. It generates an error because the SUBSTR function cannot be nested in the CONCAT functio

Answer: A

Explanation:
REPLACE(text, search_string,replacement_string) Searches a text expression for a character string and, if found, replaces it with a specified replacement string The REPLACE Function The REPLACE function replaces all occurrences of a search item in a source string with a replacement term and returns the modified source string. If the length of the replacement term is different from that of the search item, then the lengths of the returned and source strings will be different. If the search string is not found, the source string is returned unchanged. Numeric and date literals and expressions are evaluated before being implicitly cast as characters when they occur as parameters to the REPLACE function. The REPLACE function takes three parameters, with the first two being mandatory. Its syntax is REPLACE (source string, search item, [replacement term]). If the replacement term parameter is omitted, each occurrence of the search item is removed from the source string. In other words, the search item is replaced by an empty string. . The following queries illustrate the REPLACE function with numeric and date expressions: Query 1: select replace(10000-3,'9','85') from dual Query 2: select replace(sysdate, 'DEC','NOV') from dual

NEW QUESTION 6
You are the DBA for an academic database. You need to create a role that allows a group of users to modify existing rows in the STUDENT_GRADES table.
Which set of statements accomplishes this?

  • A. CREATE ROLE registrar; GRANT MODIFY ON student_grades TO registrar; GRANT registrar to user1, user2, user3
  • B. CREATE NEW ROLE registrar; GRANT ALL ON student_grades TO registrar; GRANT registrar to user1, user2, user3
  • C. CREATE ROLE registrar; GRANT UPDATE ON student_grades TO registrar; GRANT ROLE registrar to user1, user2, user3
  • D. CREATE ROLE registrar; GRANT UPDATE ON student_grades TO registrar; GRANT registrar to user1, user2, user3;
  • E. CREATE registrar; GRANT CHANGE ON student_grades TO registrar; GRANT registrar;

Answer: D

Explanation:
this is the correct solution for the answer. GRANT role_name to users;
Incorrect Answer: Athere is no such MODIFY keyword Binvalid CREATE command, there is no such NEW keyword Cinvalid GRANT command, there is no such ROLE keyword Einvalid GRANT command, there is no such CHANGE keyword
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 13-10

NEW QUESTION 7
Which object privileges can be granted on a view?

  • A. none
  • B. DELETE, INSERT,SELECT
  • C. ALTER, DELETE, INSERT, SELECT
  • D. DELETE, INSERT, SELECT, UPDATE

Answer: D

Explanation: Object privilege on VIEW is DELETE, INSERT, REFERENCES, SELECT and UPDATE.
Incorrect Answer: AObject privilege on VIEW is DELETE, INSERT, REFERENCES, SELECT and UPDATE BObject privilege on VIEW is DELETE, INSERT, REFERENCES, SELECT and UPDATE CObject privilege on VIEW is DELETE, INSERT, REFERENCES, SELECT and UPDATE
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 13-12

NEW QUESTION 8
Which two are true about aggregate functions? (Choose two.)

  • A. You can use aggregate functions in any clause of a SELECT statemen
  • B. You can use aggregate functions only in the column list of the select clause and in the WHERE clause of a SELECT statemen
  • C. You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row column
  • D. You can pass column names, expressions, constants, or functions as parameter to an aggregate functio
  • E. You can use aggregate functions on a table, only by grouping the whole table as one single grou
  • F. You cannot group the rows of a table by more than one column while using aggregate function

Answer: AD

NEW QUESTION 9
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

NEW QUESTION 10
Which two statements are true regarding the USING clause in table joins?(Choose two.)

  • A. It can be used to join a maximum of three table
  • B. It can be used to restrict the number of columns used in a NATURAL joi
  • C. It can be used to access data from tables through equijoins as well as nonequijoin
  • D. It can be used to join tables that have columns with the same name and compatible data type

Answer: BD

Explanation:
NATURAL JOIN operation A NATURAL JOIN is a JOIN operation that creates an implicit join clause for you based on the common columns in the two tables being joined. Common columns are columns that have the same name in both tables. If the SELECT statement in which the NATURAL JOIN operation appears has an asterisk (*) in the select list, the asterisk will be expanded to the following list of columns (in this order):
All the common columns
Every column in the first (left) table that is not a common column
Every column in the second (right) table that is not a common column
An asterisk qualified by a table name (for example, COUNTRIES.*) will be expanded to
every column of that table that is not a common column.
If a common column is referenced without being qualified by a table name, the column
reference points to the column in the first (left) table if the join is an INNER JOIN or a LEFT
OUTER JOIN. If it is a RIGHT OUTER JOIN, unqualified references to a common column
point to the column in the second (right) table.
Syntax
TableExpression NATURAL [ { LEFT | RIGHT } [ OUTER ] | INNER ] JOIN {
TableViewOrFunctionExpression |
( TableExpression ) }
Examples
If the tables COUNTRIES and CITIES have two common columns named COUNTRY and
COUNTRY_ISO_CODE, the following two SELECT statements are equivalent:
SELECT * FROM COUNTRIES NATURAL JOIN CITIES
SELECT * FROM COUNTRIES JOIN CITIES
USING (COUNTRY, COUNTRY_ISO_CODE)

NEW QUESTION 11
View the Exhibit and examine the structure of the CUSTOMERS table. Evaluate the following SQL statement:
1Z0-051 dumps exhibit
Which statement is true regarding the outcome of the above query?
1Z0-051 dumps exhibit

  • A. It executes successfull
  • B. It returns an error because the BETWEEN operator cannot be used in the HAVING claus
  • C. It returns an error because WHERE and HAVING clauses cannot be used in the same SELECT statemen
  • D. It returns an error because WHERE and HAVING clauses cannot be used to apply conditions on the same colum

Answer: A

NEW QUESTION 12
Here is the structure and data of the CUST_TRANS table: Exhibit:
1Z0-051 dumps exhibit
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.)

  • A. SELECT transdate + '10' FROM cust_trans;
  • B. SELECT * FROM cust_trans WHERE transdate = '01-01-07';
  • C. SELECT transamt FROM cust_trans WHERE custno > '11';
  • D. SELECT * FROM cust_trans WHERE transdate='01-JANUARY-07';
  • E. SELECT custno + 'A' FROM cust_trans WHERE transamt > 2000;

Answer: ACD

NEW QUESTION 13
Evaluate the SQL statement:
TRUNCATE TABLE DEPT;
Which three are true about the SQL statement? (Choose three.)

  • A. It releases the storage space used by the tabl
  • B. It does not release the storage space used by the tabl
  • C. You can roll back the deletion of rows after the statement execute
  • D. You can NOT roll back the deletion of rows after the statement execute
  • E. An attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an erro
  • F. You must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT table

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

NEW QUESTION 14
You issue the following command to drop the PRODUCTS table:
SQL>DROP TABLE products;
What is the implication of this command? (Choose all that apply.)

  • A. All data in the table are deleted but the table structure will remain
  • B. All data along with the table structure is deleted
  • C. All views and synonyms will remain but they are invalidated
  • D. The pending transaction in the session is committed
  • E. All indexes on the table will remain but they are invalidated

Answer: BCD

NEW QUESTION 15
View the Exhibit and examine the structure of the PROMOTIONS, SALES, and CUSTOMER tables.
1Z0-051 dumps exhibit
You need to generate a report showing the promo name along with the customer name for all products that were sold during their promo campaign and before 30th October 2007.
You issue the following query:
Which statement is true regarding the above query?

  • A. It executes successfully and gives the required resul
  • B. It executes successfully but does not give the required resul
  • C. It produces an error because the join order of the tables is incorrec
  • D. It produces an error because equijoin and nonequijoin conditions cannot be used in the same SELECT statemen

Answer: B

NEW QUESTION 16
Examine the data in the PROMO_BEGIN_DATE column of the PROMOTIONS table:
PROMO_BEGIN _DATE
04-jan-00
10-jan-00
15-dec-99
18-oct-98
22-aug-99
You want to display the number of promotions started in 1999 and 2000.
Which query gives the correct output?

  • A. SELECT SUM(DECODE(SUBSTR(promo_begin_date,8),'00',1,0)) "2000", SUM(DECODE(SUBSTR (promo_begin_date,8),'99',1,0)) "1999" FROM promotions;
  • B. SELECT SUM(CASE TO_CHAR(promo_begin_date,'yyyy') WHEN '99' THEN 1 ELSE 0 END) "1999",SUM(CASE TO_CHAR(promo_begin_date,'yyyy') WHEN '00' THEN 1 ELSE 0 END) "2000" FROM promotions;
  • C. SELECT COUNT(CASE TO_CHAR(promo_begin_date,'yyyy') WHEN '99' THEN 1 ELSE 0 END) "1999", COUNT(CASE TO_CHAR(promo_begin_date,'yyyy') WHEN '00' THEN 1 ELSE 0 END) "2000" FROM promotions;
  • D. SELECT COUNT(DECODE(SUBSTR(TO_CHAR(promo_begin_date,'yyyy'), 8), '1999', 1, 0)) "1999", COUNT(DECODE(SUBSTR(TO_CHAR(promo_begin_date,'yyyy'), 8),'2000', 1, 0)) "2000" FROM promotions;

Answer: A

NEW QUESTION 17
View the Exhibit and examine the description for the CUSTOMERS table.
1Z0-051 dumps exhibit
You want to update the CUST_INCOME_LEVEL and CUST_CREDIT_LIMIT columns for the customer with the CUST_ID 2360. You want the value for the CUST_INCOME_LEVEL to have the same value as that of the customer with the CUST_ID 2560 and the CUST_CREDIT_LIMIT to have the same value as that of the customer with CUST_ID 2566.
Which UPDATE statement will accomplish the task?

  • A. UPDATE customers SET cust_income_level = (SELECT cust_income_level FROM customers WHERE cust_id = 2560), cust_credit_limit = (SELECT cust_credit_limit FROM customers WHERE cust_id = 2566) WHERE cust_id=2360;
  • B. UPDATE customers SET (cust_income_level,cust_credit_limit) = (SELECT cust_income_level, cust_credit_limit FROM customers WHERE cust_id=2560 OR cust_id=2566) WHERE cust_id=2360;
  • C. UPDATE customers SET (cust_income_level,cust_credit_limit) = (SELECT cust_income_level, cust_credit_limit FROM customers WHERE cust_id IN(2560, 2566) WHERE cust_id=2360;
  • D. UPDATE customers SET (cust_income_level,cust_credit_limit) = (SELECT cust_income_level, cust_credit_limit FROM customers WHERE cust_id=2560 AND cust_id=2566) WHERE cust_id=2360;

Answer: A

Explanation:
Updating Two Columns with a Subquery
You can update multiple columns in the SET clause of an UPDATE statement by writing
multiple subqueries. The syntax is as follows:
UPDATE table
SET column =
(SELECT column
FROM table
WHERE condition)
[ ,
column =
(SELECT column
FROM table
WHERE condition)]
[WHERE condition ] ;

NEW QUESTION 18
Examine the structure of the EMPLOYEES table:
1Z0-051 dumps exhibit
You want to create a SQL script file that contains an INSERT statement. When the script is run, the INSERT statement should insert a row with the specified values into the EMPLOYEES table. The INSERT statement should pass values to the table columns as specified below:
1Z0-051 dumps exhibit
Which INSERT statement meets the above requirements?

  • A. INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
  • B. INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));
  • C. INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
  • D. INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
  • E. INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);

Answer: D

NEW QUESTION 19
View the Exhibit and examine the structure of the PRODUCTS tables.
You want to generate a report that displays the average list price of product categories where the average list price is less than half the maximum in each category.
Which query would give the correct output?

  • A. SELECT prod_category,avg(prod_list_price) FROM products GROUP BY prod_category HAVING avg(prod_list_price) < ALL (SELECT max(prod_list_price)/2 FROM products GROUP BY prod_category);
  • B. SELECT prod_category,avg(prod_list_price) FROM products GROUP BY prod_category HAVING avg(prod_list_price) > ANY (SELECT max(prod_list_price)/2 FROM products GROUP BY prod_category);
  • C. SELECT prod_category,avg(prod_list_price) FROM products HAVING avg(prod_list_price) < ALL (SELECT max(prod_list_price)/2 FROM products GROUP BY prod_category);
  • D. SELECT prod_category,avg(prod_list_price) FROM products GROUP BY prod_category HAVING avg(prod_list_price) > ANY (SELECT max(prod_list_price)/2 FROM products);

Answer: A

Explanation:
Using the ANY Operator in Multiple-Row Subqueries
The ANY operator (and its synonym, the SOME operator) compares a value to each value
returned by a subquery.
<ANY means less than the maximum.
>ANY means more than the minimum.
=ANY is equivalent to IN
Using the ALL Operator in Multiple-Row Subqueries
The ALL operator compares a value to every value returned by a subquery.
>ALL means more than the maximum and
<ALL means less than the minimum.
The NOT operator can be used with IN, ANY, and ALL operators.

100% Valid and Newest Version 1Z0-051 Questions & Answers shared by Surepassexam, Get Full Dumps HERE: https://www.surepassexam.com/1Z0-051-exam-dumps.html (New 292 Q&As)