define a variable representing the expression used to
calculate on emps total annual remuneration.use the
variable in a statement which finds all emps who can earn
30000 a year or more.

Answer Posted / venkat

Declare
cursor cl is select ename,sal,(sal*12) AS annualSAL FROM EMP;
i emp%rowtype;
Begin
for i in cl
loop
if i.annualSAL > 30000 then

dbms_output.put_line(i.ename);

end if;
end loop;
end;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is where clause in sql?

639


What is mutating table error?

765


What is sql mysql pl sql oracle?

692


How run sql*plus commands that are stored in a local file?

606


How can you tell the difference between an index and a view?

595






What is an exception in PL/SQL? What are the two types of exceptions?

732


Why do we go for stored procedures?

613


How to select the Nth maximum salary from Table Emp in Oracle SQL Plus ?

720


how to increment dates by 1 in mysql? : Sql dba

635


what is schema? : Sql dba

643


What is error ora-12154: tns:could not resolve the connect identifier specified?

696


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

2078


What is the purpose of the partition table?

657


What are different types of queries in sql?

616


what are the drivers in mysql? : Sql dba

647