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
What causes index fragmentation?
Why do you need a sql server?
What is molap and its advantage? : sql server analysis services, ssas
Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?
What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas
What do you mean by a dependent functionality in a build?
Explain hostprotectionattribute in sql server 2005?
What is postgresql server?
What is factless fact table? : sql server analysis services, ssas
Do I need a report server to run reports in my application?
What is transaction server distributed transaction?
What are the different kinds of ssrs reports?
What is the bookmark lookup and rid lookup?
How to create an inline table-valued function?
Will sql server 2005 allow you to reduce the size of a column?