1z0-047 | Free Oracle 1z0-047 exam


Q81. Which two statements are true regarding roles? (Choose two.) 

A. A role can be granted to itself. 

B. A role can be granted to PUBLIC. 

C. A user can be granted only one role at any point of time. 

D. The REVOKE command can be used to remove privileges but not roles from other users. 

E. Roles are named groups of related privileges that can be granted to users or other roles. 

Answer: B,E

Q82. You need to create a table for a banking application with the following considerations: 

1) You want a column in the table to store the duration of the credit period. 

2) The data in the column should be stored in a format such that it can be easily added and subtracted with 3) date type data without using the conversion functions. 

4) The maximum period of the credit provision in the application is 30 days. 

5) The interest has to be calculated for the number of days an individual has taken a credit for. 

Which data type would you use for such a column in the table? 

A. INTERVAL YEAR TOMONTH 

B. INTERVALDAYTO SECOND 

C. TIMESTAMP WITHTIMEZONE 

D. TIMESTAMP WITH LOCAL TIME ZONE 

Answer: B

Q83. View the Exhibit and examine the structure of the EMP table which is not partitioned and not an index-organized table. 

Evaluate the following SQL statement: 

ALTER TABLE emp DROP COLUMN first_name; 

Which two statements are true regarding the above command? (Choose two.) 

A. The FIRST_NAME column would be dropped provided it does not contain any data. 

B. The FIRST_NAME column would be dropped provided at least one or more columns remain in the table. 

C. The FIRST_NAME column can be rolled back provided the SET UNUSED option is added to the above SQL statement. 

D. The FIRST_NAME column can be dropped even if it is part of a composite PRIMARY KEY provided the CASCADE option is used. 

Answer: BD

Q84. Which two statements are true? (Choose two.) 

A. The USER_SYNONYMSviewcan provide information about private synonyms. 

B. The user SYSTEM owns all the base tables and user-accessible views of the data dictionary. 

C. All the dynamic performance views prefixed with V$ are accessible to all the database users. 

D. The USER_OBJECTS view can provide information about the tables and views created by the user only. 

E. DICTIONARY is a view thatcontains thenamesof allthe datadictionary views that theuser can access. 

Answer: AE

Q85. View the Exhibit and examine the structure of EMPLOYEES and JOB_IHISTORY tables. 

The EMPLOYEES table maintains the most recent information regarding salary, department, and job for all the employees. The JOB_HISTORY table maintains the record for all the job changes for the employees. You want to delete all the records from the JOB_HISTORY table that are repeated in the EMPLOYEES table. 

Which two SQL statements can you execute to accomplish the task? (Choose two.) 

A. DELETE FROM job_history j WHERE employee_id = (SELECT employee_id FROM employees e WHERE j.employee_id = e.employee_id) AND job _id = (SELECT job _id FROM employees e WHERE j.job_id = e.job_id); 

B. DELETE FROM job_history j WHERE (employee_id, job _id) = ALL (SELECT employee_id, job_id FROM employees e WHERE j.employee_id = e.employee_id and j.job_id = e.job_id) 

C. DELETE FROM job_history j WHERE employee_id = (SELECT employee_id 

FROM employees e 

WHERE j.employee_id = e.employee_id and j.job_id = e.job_id) 

D. DELETE FROM job_history j WHERE (employee_id, job _id) = (SELECT employee_id, job_id FROM employees e WHERE j.employee_id = e.employee_id and j.job_id = e.job_id) 

Answer: C,D

Q86. Which three statements are true regarding the WHERE and HAVING clauses in a SQL statement? (Choose three.) 

A. The HAVING clause conditions can have aggregate functions. 

B. The HAVING clause conditions can use aliases for the columns. 

C. WHERE and HAVING clauses cannot be used together in a SQL statement. 

D. The WHERE clause is used to exclude rows before the grouping of data. 

E. The HAVING clause is used to exclude one or more aggregated results after grouping data. 

Answer: ADE

Q87. Evaluate the following SQL statement: 

ALTER TABLE hr.emp SET UNUSED (mgr_id); 

Which statement is true regarding the effect of the above SQL statement? 

A. Any synonym existing on the EMP table would have to be re-created. 

B. Any constraints defined on the MGR_ID column would be removed by the above command. 

C. Any views created on the EMP table that include the MGR_ID column would have to be dropped and re-created. 

D. Any index created on the MGR_ID column would continue to exist until the DROP UNUSED COLUMNS command is executed. 

Answer: B

Q88. Which view would you use to display the column names and DEFAULT values for a table? 

A. DBA_TABLES 

B. DBA_COLUMNS 

C. USER_COLUMNS 

D. USER TAB COLUMNS 

Answer: D

Q89. EMPDET is an external table containing the columns EMPNO and ENAME. Which command would work in relation to the EMPDET table? 

A. UPDATE empdet SET ename ='Amit' WHERE empno = 1234; 

B. DELETE FROM empdet WHERE ename LIKE 'J%' C. CREATE VIEWempvu AS SELECT* FROMempdept; 

D. CREATEINDEX empdet_idx ON empdet(empno); 

Answer: C

Q90. Which statement correctly differentiates a system privilege from an object privilege? 

A. System privileges can be granted only by the DBA whereas object privileges can be granted by DBAs or the owner of the object. 

B. System privileges give the rights to only create user schemas whereas object privileges give rights to manipulate objects in a schema. 

C. Users require system privileges to gain access to the database whereas they require object privileges to create objects in the database. 

D. A system privilege is the right to perform specific activities in a database whereas an object privilege is a right to perform activities on a specific object in the database. 

Answer: D