<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: The integers table</title>
	<atom:link href="http://www.xaprb.com/blog/2005/12/07/the-integers-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2005/12/07/the-integers-table/</link>
	<description>Stay curious!</description>
	<lastBuildDate>Thu, 02 Sep 2010 17:10:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sage</title>
		<link>http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-15149</link>
		<dc:creator>sage</dc:creator>
		<pubDate>Mon, 29 Sep 2008 23:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-15149</guid>
		<description>Jeremy, there isn&#039;t an identity in mysql, is there?

Xaprb, am not seeing how this plus the code in your page on char-dump work together since your integer table ends up being 0-9.  There&#039;s no doubt a better way, but I created a larger integer table via a temporary 0-9 table:

create table Uintegers(i int unsigned not null);
create table integers(i int unsigned not null);
insert into Uintegers(i) values (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);

(like yours so far)
Then, use this table of 9 as workspace to create the needed collection of integers (0-999):

insert into integers ( 
   select (hundreds.i * 100) + (tens.i * 10) + units.i as iii
   from Uintegers as units
      cross join Uintegers as tens
      cross join Uintegers as hundreds );

Then, to clean up: 

drop table Uintegers;</description>
		<content:encoded><![CDATA[<p>Jeremy, there isn&#8217;t an identity in mysql, is there?</p>
<p>Xaprb, am not seeing how this plus the code in your page on char-dump work together since your integer table ends up being 0-9.  There&#8217;s no doubt a better way, but I created a larger integer table via a temporary 0-9 table:</p>
<p>create table Uintegers(i int unsigned not null);<br />
create table integers(i int unsigned not null);<br />
insert into Uintegers(i) values (0), (1), (2), (3), (4), (5), (6), (7), (8), (9);</p>
<p>(like yours so far)<br />
Then, use this table of 9 as workspace to create the needed collection of integers (0-999):</p>
<p>insert into integers (<br />
   select (hundreds.i * 100) + (tens.i * 10) + units.i as iii<br />
   from Uintegers as units<br />
      cross join Uintegers as tens<br />
      cross join Uintegers as hundreds );</p>
<p>Then, to clean up: </p>
<p>drop table Uintegers;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy West</title>
		<link>http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-14523</link>
		<dc:creator>Jeremy West</dc:creator>
		<pubDate>Wed, 07 May 2008 16:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-14523</guid>
		<description>I came accross this blog trying to learn more about Tally Tables, anyway here something else I found that does what your showing above, but faster if your interested. (Ran in about 1/9th the time for 100,000 numbers)  Cool Blog, hope that book is comming well.


DECLARE @StartTime DATETIME		--Timer to measure total 
SET @StartTime = GETDATE()		--Start the timer

SELECT TOP 100000       
     IDENTITY(INT,1,1) AS N   
INTO dbo.Tally   
FROM Master.dbo.SysColumns sc1,        
     Master.dbo.SysColumns sc2

Select * From Tally

Drop table Tally
SELECT STR(DATEDIFF(ms,@StartTime,GETDATE()))   &#039; Milliseconds duration&#039;</description>
		<content:encoded><![CDATA[<p>I came accross this blog trying to learn more about Tally Tables, anyway here something else I found that does what your showing above, but faster if your interested. (Ran in about 1/9th the time for 100,000 numbers)  Cool Blog, hope that book is comming well.</p>
<p>DECLARE @StartTime DATETIME		&#8211;Timer to measure total<br />
SET @StartTime = GETDATE()		&#8211;Start the timer</p>
<p>SELECT TOP 100000<br />
     IDENTITY(INT,1,1) AS N<br />
INTO dbo.Tally<br />
FROM Master.dbo.SysColumns sc1,<br />
     Master.dbo.SysColumns sc2</p>
<p>Select * From Tally</p>
<p>Drop table Tally<br />
SELECT STR(DATEDIFF(ms,@StartTime,GETDATE()))   &#8216; Milliseconds duration&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-1346</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Sat, 05 Aug 2006 21:45:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-1346</guid>
		<description>&lt;p&gt;Ah yes, I see &lt;a href=&quot;http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci978319,00.html&quot;&gt;you have written articles about this topic&lt;/a&gt; too!  I forget now who I originally got the idea from, but it&#039;s out there in a number of places (no pun intended).  Thanks for the compliment!&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Ah yes, I see <a href="http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci978319,00.html">you have written articles about this topic</a> too!  I forget now who I originally got the idea from, but it&#8217;s out there in a number of places (no pun intended).  Thanks for the compliment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rudy</title>
		<link>http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-85</link>
		<dc:creator>rudy</dc:creator>
		<pubDate>Sat, 04 Feb 2006 19:03:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2005/12/07/the-integers-table/#comment-85</guid>
		<description>&lt;p&gt;Thank you for providing the link to &quot;someone else&#039;s idea.&quot;  ;o)&lt;/p&gt;

&lt;p&gt;[Takes quick look around]  hey, fabulous site, and some great contents.&lt;/p&gt;

&lt;p&gt;[Bookmarks]&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Thank you for providing the link to &#8220;someone else&#8217;s idea.&#8221;  ;o)</p>
<p>[Takes quick look around]  hey, fabulous site, and some great contents.</p>
<p>[Bookmarks]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
