<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.homemarketeer.com/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.homemarketeer.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Number_Rows_in_a_Table</id>
		<title>Number Rows in a Table - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.homemarketeer.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Number_Rows_in_a_Table"/>
		<link rel="alternate" type="text/html" href="http://www.homemarketeer.com/wiki/index.php?title=Number_Rows_in_a_Table&amp;action=history"/>
		<updated>2026-10-17T07:06:22Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://www.homemarketeer.com/wiki/index.php?title=Number_Rows_in_a_Table&amp;diff=1201&amp;oldid=prev</id>
		<title>WikiSysop at 21:05, 27 May 2015</title>
		<link rel="alternate" type="text/html" href="http://www.homemarketeer.com/wiki/index.php?title=Number_Rows_in_a_Table&amp;diff=1201&amp;oldid=prev"/>
				<updated>2015-05-27T21:05:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:05, 27 May 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Say you have a [[Microsoft SQL Server]] table (MyTable) with a number column (say 15 digits, no decimals called SequenceNum), and you want this column to count the rows. In Oracle you would simply update the column with rownum:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Say you have a [[Microsoft SQL Server]] table (MyTable) with a number column (say 15 digits, no decimals called SequenceNum), and you want this column to count the rows. In &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/ins&gt;Oracle &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Database]] &lt;/ins&gt;you would simply update the column with rownum:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	<entry>
		<id>http://www.homemarketeer.com/wiki/index.php?title=Number_Rows_in_a_Table&amp;diff=1199&amp;oldid=prev</id>
		<title>WikiSysop at 21:03, 27 May 2015</title>
		<link rel="alternate" type="text/html" href="http://www.homemarketeer.com/wiki/index.php?title=Number_Rows_in_a_Table&amp;diff=1199&amp;oldid=prev"/>
				<updated>2015-05-27T21:03:18Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:03, 27 May 2015&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Say you have a table (MyTable) with a number column (say 15 digits, no decimals called SequenceNum), and you want this column to count the rows. In Oracle you would simply update the column with rownum:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Say you have a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[Microsoft SQL Server]] &lt;/ins&gt;table (MyTable) with a number column (say 15 digits, no decimals called SequenceNum), and you want this column to count the rows. In Oracle you would simply update the column with rownum:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	<entry>
		<id>http://www.homemarketeer.com/wiki/index.php?title=Number_Rows_in_a_Table&amp;diff=723&amp;oldid=prev</id>
		<title>WikiSysop: Created page with &quot;Say you have a table (MyTable) with a number column (say 15 digits, no decimals called SequenceNum), and you want this column to count the rows. In Oracle you would simply update...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.homemarketeer.com/wiki/index.php?title=Number_Rows_in_a_Table&amp;diff=723&amp;oldid=prev"/>
				<updated>2013-09-17T21:40:35Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Say you have a table (MyTable) with a number column (say 15 digits, no decimals called SequenceNum), and you want this column to count the rows. In Oracle you would simply update...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Say you have a table (MyTable) with a number column (say 15 digits, no decimals called SequenceNum), and you want this column to count the rows. In Oracle you would simply update the column with rownum:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
update MyTable set SequenceNum = rownum&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In SQL Server, we need to set up a counter and then increment it as we go:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
declare @intCounter decimal(15,0)&lt;br /&gt;
select @intCounter = 0&lt;br /&gt;
update MyTable set @intCounter = SequenceNum = @intCounter + 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Microsoft SQL Server]]&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	</feed>