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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 how to write the Rules/Constraint in SQL server?..

Author  Topic 

aquajas2000
Starting Member

1 Post

Posted - 2003-07-03 : 13:43:30
Hello Friends,

Name Description Data Type Rules/Constraint

Status Result of inspection Numeric 0 = Failed,1-Passed
MinSize Minimum size of the part Float <=MaxSize and >= 0
MaxSize 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


Thanks
Aqua...


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 TABLE

Here'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)
)





Brett

8-)
Go to Top of Page
   

- Advertisement -