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

why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

664


What are the topics in pl sql?

607


what is a scheduled jobs or what is a scheduled tasks? : Sql dba

640


tell me about various levels of constraint. : Sql dba

629


What is sqlite used for?

606






What are the types of keys?

595


Explain character-manipulation functions?

733


Can you load data into multiple tables at once? : aql loader

700


Can I learn sql in a week?

662


how to check server status with 'mysqladmin'? : Sql dba

674


Does a primary key have to be a number?

604


What is sqlservr exe?

565


Why stored procedures are faster than query?

678


What is before trigger?

658


What is sql trigger example?

644