Add Primary Key to Database using SQL

Adding a primary key to an existing table in a database using SQL. ALTER TABLE users ADD id INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST – be sure to change “users” to the name of the table you are working on.

Margaret Spyker

Leave a Reply Text

Your email address will not be published. Required fields are marked *

Powered by WishList Member - Membership Software