I have to create a table in Microsoft SQL Server, but I don't know how to check if "DaysOfWeek" field has the right valu

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

I have to create a table in Microsoft SQL Server, but I don't know how to check if "DaysOfWeek" field has the right valu

Post by answerhappygod »

I have to create a table in Microsoft SQL Server, but I don't
know how to check if "DaysOfWeek" field has the right values like
("Monday","Tuesday"...). How could I create this constraint?
I Have To Create A Table In Microsoft Sql Server But I Don T Know How To Check If Daysofweek Field Has The Right Valu 1
I Have To Create A Table In Microsoft Sql Server But I Don T Know How To Check If Daysofweek Field Has The Right Valu 1 (23.67 KiB) Viewed 40 times
CREATE TABLE EPISODE (EpisodeID INT NOT NULL IDENTITY(1,1), Duration INT NOT NULL, Special Guest VARCHAR(50) NULL, DaysOfWeek TEXT NOT NULL EpisodeNo INT NOT NULL, Title VARCHAR(30) NOT NULL, Release Date DATE NOT NULL, ShowID INT NOT NULL, CONSTRAINT EPISODEFK FOREIGN KEY (ShowID) REFERENCES TV_SHOW (ShowID), CONSTRAINT EPISODEPK PRIMARY KEY (EpisodeID), CONSTRAINT EPISODEAK UNIQUE (EpisodeNo, Title)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply