Does SQL Server Compact not support keywords 'Foreign Key References' in Create Table or am I making a mistake?
- by johnmortal
I keep getting errors using Sql Compact. I have seen that it is possible to create table constraints in compact edition as shown here. And according to the documents found here it provides "Full referential integrity with cascading deletes and updates". So am I really not allowed to do the following or am I making a mistake? I keep getting complaints from sql server compact edition that the constaint is not valid, though it works fine on express edition.
CREATE TABLE [A] (AKey int NOT NULL PRIMARY KEY);
CREATE TABLE [B] (AKey int NOT NULL FOREIGN KEY REFERENCES A(AKey));