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 difference between rank () row_number () and dense_rank () in sql?
how to use myisamchk to check or repair myisam tables? : Sql dba
What is sql catalog?
what is myisam? : Sql dba
What is tuple in sql?
Write a query to display the current date in sql?
What are the syntax and use of the coalesce function?
What is the advantage of index in sql?
Is sql a backend language?
What is the meaning of disabling a trigger?
What is sql and also describe types of sql statements?
How to make a copy values from one column to another in sql?
How to revise and re-run the last sql command?
What is the max nvarchar size?
Why do we use procedures in sql?