READ Free Dumps For Oracle- 1z0-001
Question ID 8095 | You need to create a PL/SQL program to insert records into employee table. Which block of code successfully uses the insert command?
|
Option A | DECLARE v_hiredate DATE:=SYSDATE: BEGIN INSERT INTO emp(empnp, ename, hiredate, deptno) VALUES(empno_sequence.nextval, 'and name',v_hiredate and deptno)
|
Option B | DECLARE v-hiredate DATE:=SYSDATE: BEGIN INSERT INTO emp(empnp,ename,hiredate,deptno)
|
Option C | DECLARE v-hiredate DATE:=SYSDATE: BEGIN INSERT INTO emp(empnp,ename,hiredate) VALUES(empno_sequence.nextval, name, v_hiredate) END:
|
Option D | DECLARE v-hiredate DATE:=SYSDATE: BEGIN INSERT INTO emp(empnp,ename,hiredate) VALUES(empno_sequence.nextval, name, v_hiredate) END:
|
Correct Answer | C |
Explanation Explanation/Reference: Explanation: Answer C is correct because expression EMPNO_SEQUENCE.NEXTVAL will calculate next value for EMPNP column automatically after each insert. Incorrect Answers: A: Syntax 'v_hiredate and deptno' is incorrect in INSERT VALUES statement. B: Statement does not display VALUES which need to be inserted into table. D: Using 'Job=Clerk' is incorrect syntax in the INSERT statement and in the PL/SQL block. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 153-160 Chapter 4: Creating Other Database Objects in Oracle
Question ID 8097 | You issue this command: CREATE public synonym EMP for ed.employee; Which task has been accomplished?
|
Option A | The object can now be accessed by all the users.
|
Option B | All users were given object privileges to the table.
|
Option C | The need to qualify the object name with its schema is eliminated only for you.
|
Option D | The need to qualify the object name with its schema is eliminated for all users.
|
Correct Answer | D |
Explanation Explanation/Reference: Explanation: Answer D is correct because the public synonym will be created for table EMPLOYEE of ED owner. After that other users will not need to use object owner prefix to access data inside this table. Incorrect Answers: A: Creation public synonym will not open access for ALL users, but will make more easy access for user, which have access to EMPLOYEE table of user ED. B: Creation public synonym for table does not provide objects privileges for ALL users to the table. C: Because of creation PUBLIC synonym for ED.EMPLOYEE need to qualify the object name with its owner name is eliminated for ALL users who have already access to this table, not only for you. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 183-185 Chapter 4: Creating Other Database Objects in Oracle