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
How do I trace a query in sql server?
How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
Explain different types of lock modes in sql server 2000?
What are the different types of sql server replication? : sql server replication
Sql server reporting services vs. Crystal reports.
What are the commands used in DCL?
What is mean by candidate key?
Explain what role entity and relationship play in an ER diagram.
Give the query of getting last two records from the table in SQL SERVER?
How to divide query output into multiple groups with the group by clause in ms sql server?
Explain the truncate command?
How much memory that we are using in Logshipping Concept?
How to enable tcp/ip protocol on a sql server?
Explain the use of containers in ssis?
Explain the various types of concurrency problem?