SQL Server 2008 - A clever way to fill a column with rising integers
Posted
by cc0
on Stack Overflow
See other posts from Stack Overflow
or by cc0
Published on 2010-04-16T22:11:27Z
Indexed on
2010/04/16
22:13 UTC
Read the original article
Hit count: 401
sql
|sql-server
This is a really silly question probably, I'm working on a database and what I want to do is create a table with an ID (auto increment) and another column: "Number" (I realize it sounds useless but bare with me here please), and I need to fill this "Number" column with values from 1 to 180, each time adding 1 to the previous.
What would be a clever "automatic" way of doing that?
© Stack Overflow or respective owner