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 are the ways on commenting in a pl/sql code?
How do I view stored procedures?
When should I use nosql database?
What is a temporal data type?
How do I install sql?
what are all the common sql function? : Sql dba
What is auto increment in sql?
The select into statement is most often used to create backup copies of tables or for archiving records?
What do you mean by rowid?
What are % type and % rowtype?
What are the parts of a basic sql query?
What pl/sql package consists of?
How do you write an index?
Is null operator in sql?
what are string data types? : Sql dba