It is commonly believed that cursor are Database Objects. I have always given the definition of cursor as SQL Server cursors 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 reader of blog asked me question if cursor is database object or datatype? My answer to this question is Cursor 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 same way as any other datatypes.
I would like to see all of your opinion about what do you think about cursor? Database Object or Database Datatype.
Reference : Pinal Dave (http://www.SQLAuthority.com)






hi ,sir
i have a table named leave having field like leavetype, from, to,
noofhours
how can i retrive the row by row wise inorder to calculate the noofhours
ie
these are the data of noofhours field
10.50 (it equals 10 hours n 30 min)
20.50
12.25
i want to get the each row n split the 10.50 value to two
ie. 10 n 50 n make a calculation like 50*100/60
ie i want to make the 50 into clock time
after each calculations i want to add all the data
n return the result
how can i do this …………
can u pls help me
can anyone help me about this????
hi ammen
can u plz try this ?
select leavetype,(abs(substring(loofhours,4,5))*100/60) as totalnoofhours from tablename order by totalnoofhours asc;
I think Cursor is a System DataType not Databse Object.
We create Cursor type Varaibles