MS Access Alter Table Add Constraint

The RazorSQL alter table tool includes an Add Constraint option for adding check constraints to MS Access database tables. The add constraint function allows the user to add a constraint name and a constraint condition. The tool then generates the appropriate alter table SQL command for adding the constraint to the table.

Listed below is an example of the SQL generated by the MS Access Alter Table Add Constraint function:

NOTE: Make sure the Access database is configured to support ANSI-92 query mode when attempting to use check constraints.

ALTER TABLE employee ADD CONSTRAINT test_const CHECK (salary > 0)

Below is a screen shot of the add constraint function of the MS Access alter table tool.

MS Access Add Constraint