READ Free Dumps For Oracle- 1z0-001
Question ID 8114 | The employee table contains these columns: ID_NUMBER(9) PK LAST_NAME VARCHAR2(25) NN DEPT_ID NUMBER(9) Evaluate this SQL script DEFINE id_2=93004 SELECT * FROM employee WHERE id = & id_2 Which change should u make to script so that it will execute?
|
Option A | Remove the ampersand.
|
Option B | Use the ACCEPT account
|
Option C | Add single quotation marks.
|
Option D | No change is needed.
|
Correct Answer | D |
Explanation Explanation/Reference: Explanation: Answer D is correct because script is absolutely correct by syntax. It uses substitution variable id_2 initiated by DEFINE command to set WHERE condition for SELECT statement. Incorrect Answers: A: By removing ampersand syntax will be made incorrect and SQL script will fail. B: Do not use ACCEPT account because DEFINE command is set value for the variable id_2. C: Single quotation marks are needed only if ID column would have VARCHAR2 type, not NUMBER as we see in the EMPLOYEE table definition. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 75-78 Chapter 2: Advanced Data Selection in Oracle
Question ID 8115 | In the declarative section of a PL/SQL block, you created but did not initialize a number variable. When the block executes what will be the initial value of the variable?
|
Option A | 0.
|
Option B | Null.
|
Option C | It depends on the scale and precision of the variable
|
Option D | The block will not execute because the variable was not initialized.
|
Correct Answer | B |
Explanation Explanation/Reference: Explanation: Answer B is correct because if a number variable is not initialized it has NULL value by default. Incorrect Answers: A: If a number variable is not initialized it has NULL value by default, not zero. C: If a number variable is not initialized it has NULL value by default, it does not matter what scale and precision of the variable. D: will be successfully executed even with not initialized variable. Oracle 8, DBA Certification Exam Guide, Jason S. Couchman, p. 211-215 Chapter 5: Introducing PL/SQL