外键约束ON DELETE SET DEFAULT问题
create table tb_PostBlocks(Id int identity(1,1) primary key,
BlockName varchar(100) not null unique,
BlockDesc varchar(250)
)
create table tb_PostClassifies(
Id int identity(1,1) primary key,
BlockId int null default(1),
ClassifyName varchar(50) not null unique,
ClassifyDesc varchar(250),
ClassifyLogo varchar(100),
ClassifyOrder int default(0),
foreign key(BlockId) references tb_PostBlocks(Id) ON DELETE SET DEFAULT
)
报错:在关键字 'SET' 附近有语法错误。
如果改成:foreign key(BlockId) references tb_PostBlocks(Id) ON DELETE CASCADE 就没问题。
请教各位高手,哪里出问题了,该怎么改呀?
[ 本帖最后由 goldroc 于 2010-7-13 15:54 编辑 ]