How to avoid cursors?
Submitted by: AdministratorThe main purpose that cursors fulfill is traversing of the row set. Cursors can be best avoided by:
a. Using the SQL while loop: Using a while loop we can insert the result set into the temporary table.
b. User defined functions : Cursors are sometimes used to perform some calculation on the resultant row set. This cam also be achieved by creating a user defined function to suit the needs
Submitted by: Administrator
a. Using the SQL while loop: Using a while loop we can insert the result set into the temporary table.
b. User defined functions : Cursors are sometimes used to perform some calculation on the resultant row set. This cam also be achieved by creating a user defined function to suit the needs
Submitted by: Administrator
Read Online SQL Server Cursors Job Interview Questions And Answers
Top SQL Server Cursors Questions
☺ | What is cursor in MS SQL Server? |
☺ | Explain the cursor lock types? |
☺ | What is scrollable cursor? |
☺ | Do you know the capabilities of Cursors? |
☺ | Explain Temporary table VS Table variable by using Cursor alternative? |
Top New MS SQL Server Categories
☺ | SQL Server Database Administrator Interview Questions. |
☺ | SQL Server Service Broker Interview Questions. |
☺ | SQL Server Locks Interview Questions. |
☺ | SQL Server Constraints Interview Questions. |
☺ | MS SQL Data Mining Interview Questions. |