Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hello Friends,Name Description Data Type Rules/ConstraintStatus Result of inspection Numeric 0 = Failed,1-PassedMinSize Minimum size of the part Float <=MaxSize and >= 0MaxSize Maximum size of the par Float >=MinSize and >= 0 how to write the Rules/Constraint in above table?I am using SQLServer2000....If anyone knows....Please help me out the above problem....... Any suggestions are greatly appreciated... Sql script also welcome....aquajas2000@yahoo.com ThanksAqua...
X002548
Not Just a Number
15586 Posts
Posted - 2003-07-03 : 14:02:28
Go to Books online (BOL for short) and look up CREATE TABLEHere's a sample:
CREATE TABLE jobs( job_id smallint IDENTITY(1,1) PRIMARY KEY CLUSTERED, job_desc varchar(50) NOT NULL DEFAULT 'New Position - title not formalized yet', min_lvl tinyint NOT NULL CHECK (min_lvl >= 10), max_lvl tinyint NOT NULL CHECK (max_lvl <= 250))