List:General Discussion« Previous MessageNext Message »
From:Jnaneshwar Bantanur Date:April 10 2009 10:53am
Subject:Re: auto_increment Issue
View as plain text  
Hi ,

Thanks,Its working now

Jnani

abdulazeez alugo wrote:
> 
>  
> 
>> Date: Fri, 10 Apr 2009 15:55:33 +0530
>> From: jnaneshwar.bantanur@stripped
>> To: orasnita@stripped
>> CC: defatigue@stripped; mysql@stripped
>> Subject: Re: auto_increment Issue
>>
>> Hi
>>
>> While trying for the same,I am getting the following error
>>
>> Incorrect table definition; there can be only one auto column and it
>> must be defined as a key
>>
>> 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.
>>>
> Oh sorry!
> 
> it should be ALTER TABLE tbl CHANGE id id INT UNSIGNED NOT NULL PRIMARY KEY
> AUTO_INCREMENT;
> 
> I hope this helps unless you have a column already defined as auto_increment in the
> same table.
> 
> Cheers.
> 
> _________________________________________________________________
> News, entertainment and everything you care about at Live.com. Get it now!
> http://www.live.com/getstarted.aspx

Thread
auto_increment IssueJnaneshwar Bantanur10 Apr
  • RE: auto_increment Issueabdulazeez alugo10 Apr
Re: auto_increment IssueJnaneshwar Bantanur10 Apr
  • RE: auto_increment Issueabdulazeez alugo10 Apr
    • Re: auto_increment IssueJnaneshwar Bantanur10 Apr