|
Posted by Hugo Kornelis on 10/01/13 11:23
On Sat, 6 Aug 2005 21:37:46 +0000 (UTC), Erland Sommarskog wrote:
>Hugo Kornelis (hugo@pe_NO_rFact.in_SPAM_fo) 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)
[Back to original message]
|