Minimum and maximum value of the minimum SQL value in the database

CREATE TABLE TBL_CD( CDnr int identity(1,1), CDTitel nvarchar(80) NOT NULL, CDduur int, CDprijs smallmoney, 

So, I create this table, is there a way to limit the value of CDprijs between 0 and 100?

+6
source share
1 answer

Add a control constraint:

 CREATE TABLE TBL_CD( CDnr int identity(1,1), CDTitel nvarchar(80) NOT NULL, CDduur int, CDprijs smallmoney, check (CDprijs between 0 and 100), 
+8
source

Source: https://habr.com/ru/post/984841/


All Articles