I'm trying to figure out how to add a CHECK
constraint to the Version
column to only accept NVARCHAR
values with the format as such for example:
(Number.number.number)
10.4.1
or
(number.number.number. 3numbers)
10.4.1.111
This is my table:
CREATE TABLE dbo.Table
(
ID int PRIMARY KEY IDENTITY,
Version NVARCHAR(100) NOT NULL CHECK (Version)
)
Desired result would be, when a users updates the Version
column, they must adhere to the defined formats.
For example, 11.3.4
would be acceptable and 12.4.3.444
would be acceptable.