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 rtm in testing?

576


How does a covering index work?

531


What are properties of the transaction?

560


What is a composite primary key?

583


what is foreign key? : Sql dba

589






When do we use triggers?

585


What are all types of user defined functions?

532


what are different types of collation sensitivity? : Sql dba

555


how to include numeric values in sql statements? : Sql dba

561


Explain lock escalation? : Transact sql

704


What does truncate mean in sql?

536


how to select unique records from a table? : Sql dba

632


How will you distinguish a global variable with a local variable in pl/sql?

626


Name some usages of database trigger?

564


what is the difference between where clause and having clause? : Sql dba

539