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
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
What are the topics in pl sql?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
tell me about various levels of constraint. : Sql dba
What is sqlite used for?
What are the types of keys?
Explain character-manipulation functions?
Can you load data into multiple tables at once? : aql loader
Can I learn sql in a week?
how to check server status with 'mysqladmin'? : Sql dba
Does a primary key have to be a number?
What is sqlservr exe?
Why stored procedures are faster than query?
What is before trigger?
What is sql trigger example?