You are here iC Home > Know-how > MySQL Database > SQL > ALTER TABLE ...

MySQL Database

3.2 ALTER TABLE ...


3.1 Create Table [  up  ] - [ A - Z ] - [ top ] 3.2.1 Change Constraint

Changing a Constraint

You can use the ALTER TABLE statement to change existing constraints.
ALTER TABLE hotel.customer ALTER CONSTRAINT cno_cons CHECK cno > 0
For the customer table, the cno_cons constraint has changed. The customer number must be greater than 0.

Dropping a Constraint

You can use the ALTER TABLE statement to drop a constraint.
ALTER TABLE hotel.reservation DROP CONSTRAINT staying
dev.mysql.com/doc/maxdb/en/94/38a04028f40160e10000000a1550b0/content.htm


See also:


<- 3.1 Create Table       3.2.1 Change Constraint ->

copyright by reto - created with mytexi