-
hey need help in this question
Implement the following data integrity.
q EmployeeID, RegionID and TertitoryID should be unique (Apply Identity property for these columns).
q TitleOfCourtesy field should allow Mr. Mrs. Prof. Dr. values in [HumanResource].[Employees] table
q HomePhone default value should be ‘000-000000’ if no phone value is specified in [HumanResource].[Employees] table
q Region default value should be ‘WA’ if no region value is specified in [HumanResource].[Employees] table.
q BirthDate should be greater than current date in [HumanResource].[Employees] table.
-
So Simple
Use this query
CREATE TABLE Employees
(EmployeeID varchar(50) unique,
RegionID varchar(50) unique,
TertitoryID varchar(50) unique ,
TitleOfCourtesy varchar(50),
HomePhone varchar(50) default '000-000000',
Region varchar(50) default 'WA',
Birth_Date datetime CHECK (Birth_Date > getdate()))
Hope it will work for u..........
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|