
create table Contacts 
(
   FirstName nvarchar(30),
   LastName  nvarchar(30),
   EmailAddress nvarchar(30) CHECK 
 (dbo.RegExMatch('[a-zA-Z0-9_\-]+@([a-zA-Z0-9_\-]+\.)+(com|org|edu)',  
                  EmailAddress) = 1),
   USPhoneNo nvarchar(30) CHECK 
 (dbo.RegExMatch('\([1-9][0-9][0-9]\) [0-9][0-9][0-9]\-[0-9][0-9][0-9][0-9]', 
    UsPhoneNo)=1),
   AreaCode AS dbo.ExtractAreaCode(UsPhoneNo) PERSISTED 
)
go

insert Contacts values('Bob', 'Beauchemin', 'bobb@SQLskills.com', '503-555-1212')
go