|
|
|
|
||||||
| ms.sqlserver.setup Questions about SQL Server. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
If this is the relation with its constraints:
CREATE TABLE Orders (o_num INTEGER NOT NULL PRIMARY KEY, c_num INTEGER NOT NULL, s_num INTEGER DEFAULT 0 NOT NULL, o_date DATE NOT NULL, o_filled o_filled, CONSTRAINT fk_cnum FOREIGN KEY (c_num) REFERENCES Customers (c_num) ON UPDATE CASCADE ON DELETE CASCADE); Where do I put the domain def: CREATE DOMAIN o_filled AS VARCHAR (5) DEFAULT 'false' CHECK (VALUE= 'true' OR VALUE='false'); if I try to created the domain thingy separate i get an error about an empy string. If how does the relation reference it (domain) as a constraint? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
It's not implemented. Check out:
http://connect.microsoft.com/SQLServ...dbackID=124645 -- Tom ---------------------------------------------------- Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS SQL Server MVP Toronto, ON Canada https://mvp.support.microsoft.com/profile/Tom.Moreau "juju" <techtechxxxx@gmail.com> wrote in message news:c428bc99-7155-4595-af92-d0091df6320d@d1g2000hsg.googlegroups.com... If this is the relation with its constraints: CREATE TABLE Orders (o_num INTEGER NOT NULL PRIMARY KEY, c_num INTEGER NOT NULL, s_num INTEGER DEFAULT 0 NOT NULL, o_date DATE NOT NULL, o_filled o_filled, CONSTRAINT fk_cnum FOREIGN KEY (c_num) REFERENCES Customers (c_num) ON UPDATE CASCADE ON DELETE CASCADE); Where do I put the domain def: CREATE DOMAIN o_filled AS VARCHAR (5) DEFAULT 'false' CHECK (VALUE= 'true' OR VALUE='false'); if I try to created the domain thingy separate i get an error about an empy string. If how does the relation reference it (domain) as a constraint? |
|
![]() |
| Outils de la discussion | |
|
|