Answer the question
In order to leave comments, you need to log in
How to make sure that the start date is not later than the finish date?
How to put a limit between two dates
Answer the question
In order to leave comments, you need to log in
CREATE TABLE [dbo].[StartFinish](
[DateStart] [datetime] NULL,
[DateFinish] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StartFinish] WITH CHECK
ADD CONSTRAINT [CK_StartFinish] CHECK ((datediff(day,[DateStart],[DateFinish])>(0)))
GO
ALTER TABLE [dbo].[StartFinish] CHECK CONSTRAINT [CK_StartFinish]
GO
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question