[Free] 2019(Nov) EnsurePass Oracle 1z0-061 Dumps with VCE and PDF 161-170

Get Full Version of the Exam
http://www.EnsurePass.com/1z0-061.html

Question No.161

Examine these statements: CREATE ROLE registrar;

GRANT UPDATE ON student_grades TO registrar; GRANT registrar to user1, user2, user3;

What does this set of SQL statements do?

  1. The set of statements contains an error and does not work.

  2. It creates a role called REGISTRAR, adds the MODIFY privilege on the STUDENT_GRADES object to the role, and gives the REGISTRAR role to three users.

  3. It creates a role called REGISTRAR, adds the UPDATE privilege on the STUDENT_GRADES object to the role, and gives the REGISTRAR role to three users.

  4. It creates a role called REGISTRAR, adds the UPDATE privilege on the STUDENT_GRADES object to the role, and creates three users with the role.

  5. It creates a role called REGISTRAR, adds the UPDATE privilege on three users, and gives the REGISTRAR role to the STUDENT_GRADES object.

  6. It creates a role called STUDENT_GRADES, adds the UPDATE privilege on three users, and gives the UPDATE role to the registrar.

Correct Answer: C

Explanation:

the statement will create a role call REGISTRAR, grant UPDATE on student_grades to registrar, grant the role to user1, user2 and user3.

Incorrect answer:

  1. the statement does not contain error

  2. there is no MODIFY privilege

  1. statement does not create 3 users with the role

  2. privilege is grant to role then grant to user

  3. privilege is grant to role then grant to user

Question No.162

Which two statements are true about sequences created in a single instance database? (Choose

two.)

  1. CURRVAL is used to refer to the last sequence number that has been generated

  2. DELETE lt;sequencenamegt; would remove a sequence from the database

  3. The numbers generated by a sequence can be used only for one table

  4. When the MAXVALUE limit for a sequence is reached, you can increase the MAXVALUE limit by using the ALTER SEQUENCE statement

  5. When a database instance shuts down abnormally, the sequence numbers that have been cached but not used would be available once again when the database instance is restarted

Correct Answer: AD

Explanation:

Gaps in the Sequence

Although sequence generators issue sequential numbers without gaps, this action occurs independent of a commit or rollback. Therefore, if you roll back a statement containing a sequence, the number is lost.

Another event that can cause gaps in the sequence is a system crash. If the sequence caches values in memory, those values are lost if the system crashes. Because sequences are not tied directly to tables, the same sequence can be used for multiple tables.

However, if you do so, each table can contain gaps in the sequential numbers. Modifying a Sequence

If you reach the MAXVALUE limit for your sequence, no additional values from the sequence are allocated and you will receive an error indicating that the sequence exceeds the MAXVALUE. To continue to use the sequence, you can modify it by using the ALTER SEQUENCE statement

To remove a sequence, use the DROP statement: DROP SEQUENCE dept_deptid_seq;

Question No.163

View the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables.

image

The CUSTOMERS table contains the current location of all currently active customers. The CUST_HISTORY table stores historical details relating to any changes in the location of all current as well as previous customers who are no longer active with the company.

You need to find those customers who have never changed their address.

Which SET operator would you use to get the required output?

  1. INTERSECT

  2. UNION ALL

  3. MINUS

  4. UNION

Correct Answer: C

Question No.164

See the Exhibit and examine the structure and data in the INVOICE table:

image

Which two SQL statements would execute 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 No.165

View the Exhibits and examine the structures of the PROMOTIONS and SALES tables.

image

image

Evaluate the following SQL statements:

image

Which statement is true regarding the output of the above query?

  1. It gives details of product IDs that have been sold irrespective of whether they had a promo or not.

  2. It gives the details of promos for which there have been no sales.

  3. It gives the details of promos for which there have been sales.

  4. It gives details of all promos irrespective of whether they have resulted in a sale or not.

Correct Answer: D

Question No.166

You need to calculate the number of days from 1st Jan 2007 till date. Dates are stored in the default format of dd-mon-rr.

Which two SQL statements would give the required output? (Choose two.)

  1. SELECT SYSDATE – TO_DATE (#39;01/JANUARY/2007#39;) FROM DUAL;

  2. SELECT TO_DATE (SYSDATE, #39;DD/MONTH/YYYY#39;)-#39;01/JANUARY/2007#39; FROM DUAL;

  3. SELECT SYSDATE – TO_DATE (#39;01-JANUARY-2007#39;) FROM DUAL;

  4. SELECT SYSDATE – #39;01-JAN-2007#39; FROM DUAL;

  5. SELECT TO_CHAR (SYSDATE, #39;DD-MON-YYYY#39;)-#39;01-JAN-2007#39; FROM DUAL;

Correct Answer: AC

Question No.167

Which are /SQL*Plus commands? (Choose all that apply.)

  1. INSERT

  2. UPDATE

  3. SELECT

  4. DESCRIBE

  5. DELETE

  6. RENAME

Correct Answer: D

Explanation:

Describe is a valid iSQL*Plus/ SQL*Plus command.

INSERT, UPDATE amp; DELETE are SQL DML Statements. A SELECT is an ANSI Standard SQL Statement not an iSQL*Plus Statement.

RENAME is a DDL Statement.

Question No.168

Examine the structure and data of the CUSTJTRANS table: CUSTJRANS

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-mon-rr in the CUSTJTRANS table. Which three SQL statements would execute successfully? (Choose three.)

  1. SELECT transdate #39;10#39; FROM custjrans;

  2. SELECT * FROM custjrans WHERE transdate = #39;01-01-07#39;:

  3. SELECT transamt FROM custjrans WHERE custno gt; #39;11#39;:

  4. SELECT * FROM custjrans WHERE transdate=#39;01-JANUARY-07#39;:

  5. SELECT custno – #39;A#39; FROM custjrans WHERE transamt gt; 2000:

Correct Answer: ACD

Question No.169

View the Exhibit and examine the structure of the CUSTOMERS table .Which statement would display the highest credit limit available in each income level in each city in the CUSTOMERS table?

image

  1. SELECT cust_city, cust_income_level, MAX(cust_credit_limit ) FROM customersGROUP BY cust_city, cust_income_level, cust_credit_limit;

  2. SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customersGROUP BY

    cust_city, cust_income_level;

  3. SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customersGROUP BY cust_credit_limit, cust_income_level, cust_city ;

  4. SELECT cust_city, cust_income_level, MAX(cust_credit_limit) FROM customersGROUP BY cust_city, cust_income_level, MAX(cust_credit_limit);

Correct Answer: B

Question No.170

You need to perform these tasks:

Which set of SQL statements achieves the desired results?

  1. CREATE ROLE manager;GRANT create table, create viewTO manager;GRANT manager TO BLAKE, CLARK;

  2. CREATE ROLE manager;GRANT create table, create voewTO manager;GRANT manager ROLE TO BLAKE, CLARK;

  3. GRANT manager ROLE TO BLAKE, CLARK;GRANT create table, create voewTO BLAKE CLARK;***MISSING***

Correct Answer: A

Explanation:

Result of commands:

image

Get Full Version of the Exam
1z0-061 Dumps
1z0-061 VCE and PDF