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 / prasuna

Alternate 1

Define a cursor which holds the empname,salary and annual
renumeration
Use this cursor in a PL/SQL Block to find the emps who earn
30000 or more.

example :
Declare
cursor cl is select empname,salary,(salary*12)annual
renumeration
Begin
for i in cl
Loop
if i.annual renumeration > 30000 then
dbmsoutput.putline(empname);
end if
end

Approarch2
Write a stored function the take emp salary as i/p and
returns annual salary

Using this function in select statement can find the list
of emps who earn more than 30000

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the parts of a sql statement?

555


What are the two types of periodical indexes?

505


What is a constraint?

567


how to include character strings in sql statements? : Sql dba

556


How do you modify a table in sql?

565






What is substitution variable in pl sql?

505


What is ttitle and btitle?

576


Can a select statement fire a trigger?

660


What are the types of records?

535


How can we solve sql error: ora-00904: invalid identifier?

699


What is the left table in sql?

519


what is the difference between char and varchar data types? : Sql dba

539


Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?

559


Does truncate release storage space?

560


How do I use google cloud in sql?

542