By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,766 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,766 IT Pros & Developers. It's quick & easy.

Create table with 15,000,000 default rows

P: n/a
Hi I want to create a table with one column, which is a identity
column.
Let's say like this:
CREATE TABLE DefaultTable(N int identity(0,1))

Then I want to fill this table with 15,000,000 records, so that I have
a table with the numbers 0 to 14,999,999.

How can I do this as fast as possible. A standard INSERT would take a
long time.

(It can be a temp table or a table variable. I just need a list with
numbered 0 to 15,000,000)

Thank you.

Gidon

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
http://www.bizdatasolutions.com/tsql/tblnumbers.asp
--
David Portas
SQL Server MVP
--

Jul 23 '05 #2

P: n/a
Thanks a lot.

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.