我是SQL Server CE的新手。
当我尝试创建具有外键和主键关系的表时,我收到错误。 能不能让我知道我的代码有什么问题。
CREATE TABLE ACTIVECALLS
(CallID int PRIMARY KEY,
EPName nvarchar PRIMARY KEY,
ConsoleName nvarchar,
DispatcherName nvarchar,
EmergencyCall bit,
CallDirectionId tinyint foreign key references CallDirection(CallDirectionId),
CallStateId tinyint foreign key references CallState(CallStateId)
);
答案 0 :(得分:0)
CREATE TABLE ACTIVECALLS(
CallID int PRIMARY KEY,
EPName nvarchar(50) PRIMARY KEY,
ConsoleName nvarchar(50,
DispatcherName nvarchar(50),
EmergencyCall bit,
CallDirectionId tinyint references CallDirection(CallDirectionId ),
CallStateId tinyint references CallState(CallStateId));