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 sql partition function?
Whis is not false in primary key?
What are the different ways to optimize a sql query?
what is the difference between cluster and non cluster index? : Sql dba
how to enter binary numbers in sql statements? : Sql dba
what are the differences between char and nchar? : Sql dba
What are the query optimization techniques?
How to make a copy values from one column to another in sql?
what is the difference between char and varchar data types? : Sql dba
What is the difference between left and left outer join?
what happens if you no create privilege in a database? : Sql dba
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
How to fetch alternate records from a table?
How to load data with sql*loader?
How do you break a loop in pl sql?