SQL ALTER ADD CONSTRAINTS
Add primary key constraints
ALTER TABLE Persons
ADD PRIMARY KEY (ID);
Add not null constraints
ALTER TABLE table_name MODIFY column_name datatype NOT NULL;
ALTER TABLE Persons
ADD PRIMARY KEY (ID);
Add not null constraints
ALTER TABLE table_name MODIFY column_name datatype NOT NULL;
Resource: https://www.tutorialspoint.com/sql/sql-alter-command.htm
Comments
Post a Comment