READ Free Dumps For Oracle- 1z0-001
Question ID 8071 | Examine the structure of STUDENT table. NAME NULL TYPE STUDENT ID NOT NULL NUMBER(3) NAME NOT NULL VARCHAR2(25) PHONE NOT NULL VARCHAR2(9) ADDRESS VARCHAR2(50) GRADUATION DATE There are hundred records in the student table. You need to modify the Phone column to hold only numeric value. Which statement will modify the data type of the Phone column? |
Option A | ALTER TABLE student MODIFY phone NUMBER(9) |
Option B | ALTER STUDENT table MODIFY COLUMN phone NUMBER(9); |
Option C | You can not modify a VARCHAR2 data type to a NUMBER data type for a |
Option D | Column. |
Option E | You cannot modify the data type of a column if there is data in the column. |
Correct Answer | E |
Question ID 8072 | You need to update employee salaries if the salary of an employee is less than 1000. The salary needs to be incremented by 10%. Use SQL*Plus substitution variable to accept the employee number. Which PL/SQL block successfully updates the salaries? |
Option A | Declare V_sal emp.sal % TYPE; Begin SELECT Sal INTO V_sal FROM emp WHERE empno = and P_empno; IF (V_Sal<1000) THEN UPDATE emp INTO Sal := Sal*1.1 WHERE empno = and P_empno; END IF; END; |
Option B | Declare V_sal emp.sal % TYPE; Begin SELECT Sal INTO V_sal FROM emp WHERE empno = and P_empno; IF (V_Sal<1000) THEN SAL := SAL * 1.1; END IF; END; |
Option C | Declare V_sal emp.sal % TYPE; Begin SELECT Sal INTO V_sal FROM emp WHERE empno = and P_empno; IF (V_Sal<1000) THEN UPDATE emp Sal := Sal*1.1 WHERE empno = and P_empno; END IF; END; |
Option D | Declare V_sal emp.sal % TYPE; Begin SELECT Sal INTO V_sal FROM empWHERE empno = and P_empno; IF (V_Sal<1000) THEN UPDATE emp Set Sal := Sal*1.1 WHERE empno = and P_empno; END IF; END; |
Correct Answer | D |