Re: Triiger -vs- Constraint
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 07 Aug 2005 00:30:13 +0200
On Sat, 6 Aug 2005 21:37:46 +0000 (UTC), Erland Sommarskog wrote:
>Hugo Kornelis (hugo@xxxxxxxxxxxxxxxxxxxxxx) writes:
>> I don't think that matters much. With ANSI_NULLS on, you can index the
>> computed column, but you still can't use it in a FOREIGH KEY constraint.
>
>In SQL 2005 you can:
>
> CREATE TABLE a (a int NOT NULL,
> b AS a + 3 PERSISTED)
> CREATE TABLE c (c int NOT NULL PRIMARY KEY)
> go
> ALTER TABLE a ADD CONSTRAINT fk
> FOREIGN KEY (b) REFERENCES c(c)
> go
> INSERT c (c) VALUES (9)
> INSERT a (a) VALUES (6)
> go
> DROP TABLE a, c
Hi Erland,
Thanks. I can't wait until SQL Server 2005 is released, and I can
finally get to play around with all the nice new features!
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- References:
- Triiger -vs- Constraint
- From: csomberg
- Re: Triiger -vs- Constraint
- From: Erland Sommarskog
- Re: Triiger -vs- Constraint
- From: Hugo Kornelis
- Re: Triiger -vs- Constraint
- From: Erland Sommarskog
- Re: Triiger -vs- Constraint
- From: Hugo Kornelis
- Re: Triiger -vs- Constraint
- From: Erland Sommarskog
- Triiger -vs- Constraint
- Prev by Date: Re: Triiger -vs- Constraint
- Next by Date: SQL select records NOT in both tables
- Previous by thread: Re: Triiger -vs- Constraint
- Next by thread: SQL select records NOT in both tables
- Index(es):
Relevant Pages
|