Dear All,
Question for this Week
Find out possible error(s) (either at compile
time or at runtime) in the following PL/SQL block. State
the reason(s) and correct the errors.
Declare
Cursor C1 is select ename, sal, comm from emp;
Begin
For i in C1 Loop
If i.comm between 299 and 999 then
Dbms_output.put_line(i.Ename || ‘
** Good Commission’);
Elsif i.comm > 999 then
Dbms_output.put_line(i.Empno || ‘
** Very Good Commission’);
close C1;
Else
Dbms_output.put_line(i.Ename || ‘
** ’ ||nvl(i.comm,‘O’));
End if;
End Loop;
End;
Answer Posted / intejar ahmad
invalid single quotes and cursor does not selecy empno
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between sql and isql*plus?
What is a recursive join sql?
What is the plv (pl/vision) package offers?
What are the constraints available in sql?
Lookups are a key component in sql server integration services (ssis). Explain its purpose?
What is the difference between having clause and where clause?
How can we debug in PL/SQL?
What is the use of nvl function?
How to use sql*plus built-in timers?
What is self-join and what is the requirement of self-join?
What does subquery mean in sql?
Can you selectively load only those records that you need? : aql loader
How many clustered indexes can you have?
Which one is better sql or oracle?
Explain the order of sql statement execution?