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...

How to avoid cursors?

Answer Posted / mahima

to avoid cursor use CASE and SET .
to give increment to the employee depending upon the salary

update empsal
set
case when sal between 2000 AND 3000 then sal+1000
when sal between 3000 AND 4000 then sal+2000
end

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I trace a query in sql server?

957


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

2000


Explain different types of lock modes in sql server 2000?

932


What are the different types of sql server replication? : sql server replication

1277


Sql server reporting services vs. Crystal reports.

134


What are the commands used in DCL?

1028


What is mean by candidate key?

1011


Explain what role entity and relationship play in an ER diagram.

1075


Give the query of getting last two records from the table in SQL SERVER?

963


How to divide query output into multiple groups with the group by clause in ms sql server?

1044


Explain the truncate command?

988


How much memory that we are using in Logshipping Concept?

1797


How to enable tcp/ip protocol on a sql server?

1165


Explain the use of containers in ssis?

967


Explain the various types of concurrency problem?

1198