Jump to content

[SOLVED] Droping and Altering id column


RIRedinPA

Recommended Posts

I'm trying to drop my id column and then add it back to the db. This seemed to work but it generated an error (but the column was deleted)

 

ALTER TABLE AddressBook DROP COLUMN id

 

but then I wasn't able to add the id column back. I'm also not sure how to declare this as a primary key...

 

ALTER TABLE AddressBook ADD Column (id bigint not null auto_increment)

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/137571-solved-droping-and-altering-id-column/
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.