MySql-how to create an autoincrement column

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

MySql-how to create an autoincrement column

Post by pelegk2 »

i have an existing table with data say called "table10"
and i want using code to add a column with an autoincrement (so on every insert the index will grow by 1 automaticlly)
thnaks i nadvance
peleg
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: MySql-how to create an autoincrement column

Post by califdon »

pelegk2 wrote:i have an existing table with data say called "table10"
and i want using code to add a column with an autoincrement (so on every insert the index will grow by 1 automaticlly)
thnaks i nadvance
peleg
http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
Post Reply