Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is difference between rank () row_number () and dense_rank () in sql?

1048


how to use myisamchk to check or repair myisam tables? : Sql dba

910


What is sql catalog?

961


what is myisam? : Sql dba

999


What is tuple in sql?

1004


Write a query to display the current date in sql?

966


What are the syntax and use of the coalesce function?

1102


What is the advantage of index in sql?

914


Is sql a backend language?

1037


What is the meaning of disabling a trigger?

1110


What is sql and also describe types of sql statements?

993


How to make a copy values from one column to another in sql?

978


How to revise and re-run the last sql command?

1098


What is the max nvarchar size?

896


Why do we use procedures in sql?

1017