You are here: Re: Incrementing number in a column -- rookie sql user « MsSQL Server « IT news, forums, messages
Re: Incrementing number in a column -- rookie sql user

Posted by Greg D. Moore \(Strider\) on 06/02/05 04:22

<bigjmt@hotmail.com> wrote in message
news:1117635516.378966.93950@g47g2000cwa.googlegroups.com...
> Sorry to bother you guys with what I though would be an easy task. I
> have a table in my database were I would like one of the rows to
> increment a number for each row. I want the first row to start at 1000
> and keep on incrementing by 1 'till the end of the rows (about 2.7
> million rows). I though this would be a piece of cake, but I just can't
> seem to find anything like it on the internet...weird.
> Anyways, I'm just a rookie in sql, any help would be appreciated
> Thanks

First thing to understand.

There is no concept of "first row" or "last row" in a table. It's an
unordered set.

The only way to specify an order when doing a query is with an order by in
the query.


> JMT
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация