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 a recursive stored procedure?

1183


what are the different index configurations a table can have? : Sql dba

996


Write the command to remove all players named sachin from the players table.

1184


Why use truncate instead of delete?

1016


What is procedure and function?

981


What is duration in sql profiler trace?

1079


How does index help in query performance?

1028


how many ways to get the current time? : Sql dba

1007


How do I find sql profiler?

941


what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba

975


What is field delimiter?

1048


How do I send sql query results to excel?

1066


how to decrement dates by 1 in mysql? : Sql dba

1019


What are the rules to be applied to nulls whilst doing comparisons?

1323


What is the purpose of the primary key?

1063