Journal Calendar
<feb 2003>
SMTWTFS
      1
2 34 5678
91011 12131415
16 1718 19 20 2122
232425 2627 28 

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)

SQL quizArticle Image

Journal Entry Posted @ 12:26 GMT


Journal Index