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
What is sql*loader and what is it used for?
Explain the difference in execution of triggers and stored procedures?
explain the difference between myisam static and myisam dynamic. : Sql dba
how can we destroy the cookie? : Sql dba
Is postgresql a nosql database?
What are the types of dbms?
How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?
How much does sql certification cost?
Why do we use view in sql?
What is union?
Can a table contain multiple foreign key’s?
What is pragma in pl sql?
What is the least restrictive isolation level? : Transact sql
What are the two types of periodical indexes?
What is clustered index in sql?