Seems like none of them is correct. Closest to the truth is A, but 99999.01 is greater than 99999 and still makes the program work... so as long as the rounded number does not exceed 6 digits it will work without an error.
select salary, first_name
from employees
where employee_id = 200;
--salary = 5400
update employees
set salary = salary + 0.58
where employee_id = 200;
commit;
select salary, first_name
from employees
where employee_id = 200;
--salary = 5400.58
declare
first_name employees.first_name%type;
v_name first_name%type;
v_salary number(5);
v_emp_id employees.employee_id%type := 200;
begin
select salary, first_name
into v_salary, first_name
from employees
where employee_id = v_emp_id;
dbms_output.put_line('v_salary is '||v_salary ||' first_name is '||first_name);
end;
--v_salary is 5401 first_name is George
E is correct
No, you are incorrect. As you have showed in your example when the anonymous block is executed the number 5400.58 is rounded to 5401, so if the salary of employee 200 is bigger that 99999.49(for example 99999.50. The block will try to round the salary to 100000) that will get the error: ORA-06502: PL/SQL: numeric or value error: number precision too large and so the correct answer is A
upvoted 1 times
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
usarovsherzod68
5Â months ago[Removed]
1Â year, 3Â months agoTheOracleWasTaken
1Â year, 4Â months agojfc1
1Â year, 7Â months agoGoto10
1Â year, 7Â months agoISKV
1Â year, 9Â months agoKOCE_1999
1Â year, 8Â months ago