Whenever we want to loop something we always look for logic like WHILE LOOP or FOR LOOP. Trust me on my word that both of them are cursor when it is about SQL Server.
It is commonly believed that the cursor is Database Objects. I have always given the definition of it as they are database objects used to manipulate data in a set on a row-by-row basis.
Just a few days ago – Imran one of the active readers of the blog asked me question if the cursor is database object or datatype? My answer to this question is it is Database Object. However, this question is very, very interesting. We define cursor same was as datatypes using DECLARE statement and it can be used the same way as any other data types.
I would like to see all of your opinions about what do you think about the this subject? Database Object or Database Datatype.
Here are few of the blog posts which are very much related to the subject. I would like all of you to check that out..
Please leave a comment with your thought. I will be happy to discuss with you more on this topic.
Reference: Pinal Dave (http://blog.SQLAuthority.com)