Page Published [5-FEB-2003]
Adding Contraints to SQL tables
Constraints are important within a database structure as they insure database integrity.
This useful SQL command shows how to add constraints to existing SQL tables.
In this command a constraint between 2 tables (tblCountries and tblCompanies) is being created called FK_tblCompanies_tblCountries.
alter table dbo.tblCompanies add constraint FK_tblCompanies_tblCountries foreign key (ISOCountryCode) references dbo.tblCountries(ISOCountryCode)
Posted @ 12:26 GMT

