Jump to content

command to add column to a table


OriginalSunny

Recommended Posts

Hi,
i am fairly new to mysql. I need to add a new column to a table and it works fine when using the following command:

alter table [i]table name[/i] add [i]column name[/i] int(10) first;

however i wish to also make it the new primary key of the table and also to assign it an auto increment value. How do i go about doing this?? Thanks.
Link to comment
https://forums.phpfreaks.com/topic/3327-command-to-add-column-to-a-table/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.