0

Im a newbie at this stuff, so could someone please post how to alter a table so that i can make a field called numbers to be auto incremented. I dont know how to do this please. The table is called blog. Or can you post how to setup a auto incremented field. Thanks. Oh and i use phpmyadmin!

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by nav33n
0

If you 'investigate' properly in phpmyadmin, there is an option exactly below the table's structure to add a new column. You can specify the columnname, its datatype and mention "auto_increment" under extra. :-) Its quite simple.

ALTER TABLE tablename ADD columnname INT NOT NULL AUTO_INCREMENT

is the query (just in case if you can't find it!)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.