﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / s there any difference in using cursor and table? / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Mon, 20 May 2013 03:38:06 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: s there any difference in using cursor and table?</title><link>http://www.sqlservercentral.com/Forums/Topic1382423-391-1.aspx</link><description>[quote][b]Koen Verbeeck (11/8/2012)[/b][hr][quote][b]sumith1andonly1 (11/8/2012)[/b][hr]is it possible to fetch multiple columns (using cursor)[/quote]Let's be clear here:cursors are sloooooooooooow.Only use them if you have a very good reason to use them.[/quote] Yes, I agree. Cursors are slow because they do row by row transactions instead of set based transactions which are much much much faster than row by row transactions.</description><pubDate>Fri, 09 Nov 2012 02:25:33 GMT</pubDate><dc:creator>vinu512</dc:creator></item><item><title>RE: s there any difference in using cursor and table?</title><link>http://www.sqlservercentral.com/Forums/Topic1382423-391-1.aspx</link><description>[quote][b]sumith1andonly1 (11/8/2012)[/b][hr]is it possible to fetch multiple columns (using cursor)[/quote]Let's be clear here:cursors are sloooooooooooow.Only use them if you have a very good reason to use them.</description><pubDate>Thu, 08 Nov 2012 23:54:46 GMT</pubDate><dc:creator>Koen Verbeeck</dc:creator></item><item><title>RE: s there any difference in using cursor and table?</title><link>http://www.sqlservercentral.com/Forums/Topic1382423-391-1.aspx</link><description>[quote][b]sumith1andonly1 (11/8/2012)[/b][hr]is it possible to fetch multiple columns (using cursor)[/quote]Yes it is possible to fetch multiple columns using cursors. You need to do a little research on Cursors.....the following link would help you a lot:[url=http://msdn.microsoft.com/en-us/library/ms180169.aspx]MSSQL Cursor[/url]</description><pubDate>Thu, 08 Nov 2012 22:21:05 GMT</pubDate><dc:creator>vinu512</dc:creator></item><item><title>RE: s there any difference in using cursor and table?</title><link>http://www.sqlservercentral.com/Forums/Topic1382423-391-1.aspx</link><description>is it possible to fetch multiple columns (using cursor)</description><pubDate>Thu, 08 Nov 2012 20:34:32 GMT</pubDate><dc:creator>sumith1andonly1</dc:creator></item><item><title>RE: s there any difference in using cursor and table?</title><link>http://www.sqlservercentral.com/Forums/Topic1382423-391-1.aspx</link><description>^ This, and they're usually not compared to each other, as they have totally different uses.  What you mentioned is a table variable and is more aptly compared to a temp table, while cursors to while loops.  You can use a cursor on a temp table, to do a per-row transaction/DML, but not vice versa.  A good analogy would be like comparing a subject with an adjective.</description><pubDate>Thu, 08 Nov 2012 13:45:13 GMT</pubDate><dc:creator>jad0083</dc:creator></item><item><title>RE: s there any difference in using cursor and table?</title><link>http://www.sqlservercentral.com/Forums/Topic1382423-391-1.aspx</link><description>Yes there is typically a huge difference depending on what you want to do.Cursors are typical RBAR meaning it processes a row at a time, where as with a table it can process a "set" of data at a time which is more effective.</description><pubDate>Thu, 08 Nov 2012 05:08:59 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>s there any difference in using cursor and table?</title><link>http://www.sqlservercentral.com/Forums/Topic1382423-391-1.aspx</link><description>is there any difference in using cursor and table ?any performance issues ?sample are shown belowexample 1:declare rs_cursor CURSOR for select name from master.dbo.sysdatabases example 2:DECLARE @temp as table (RowID int not null primary key identity(1,1),                                    Filename  varchar(500))insert into @temp  select name from master.dbo.sysdatabases </description><pubDate>Thu, 08 Nov 2012 05:04:22 GMT</pubDate><dc:creator>sumith1andonly1</dc:creator></item></channel></rss>