MySQL Generator

Add Primary Key Table Structure

Query Output:

CopiedCopy Code

ALTER TABLE <table_name> ADD PRIMARY KEY(<comma seperated fields>);


Drop Primary Key Table Structure

Query Output:

CopiedCopy Code

ALTER TABLE <table_name> DROP PRIMARY KEY;