OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
RE: auto_increment Issue

From: abdulazeez alugo (defatiguehotmail.com)
Date: Fri Apr 10 2009 - 05:07:14 CDT


 

> Date: Fri, 10 Apr 2009 15:15:28 +0530
> From: jnaneshwar.bantanurkavach.net
> To: mysqllists.mysql.com
> Subject: auto_increment Issue
>
>
> Hi All
>
> I have created a table.Now I need to make a field Auto_increment...Help
> me with this issue..An example will do..
>
> Regards
> Jnani

Hi Jnani,

Assuming your table name is tbl and the field for the auto_increment is id, just write:

 

ALTER TABLE tbl CHANGE id id INT UNSIGNED NOT NULL AUTO_INCREMENT;

 

I hope that helps.

Cheers.

 

Alugo Abdulazeez.

_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/products/events.aspx