--语句本身没问题啊:
create table stora_stock
( STID int identity(1,1) primary key,
SID int not null,
Pcode Char(15) not null,
foreign key (SID) references stora_step (SID) On Update Cascade,
foreign key (Pcode) references Product (Pcode) On Update Cascade,
)
create table stora_stock
( STID int identity(1,1) primary key,
SID int not null,
Pcode Char(15) not null,
foreign key (SID) references stora_step (SID) On Update Cascade,
foreign key (Pcode) references Product (Pcode) On Update Cascade,
)
解决方案 »
- 要显示的列表名和其数据全都为表中存着的怎么用一个存储解决?
- 一个简单的SQL?
- vc开发的mssql程序转到别的电脑后无法运行
- group by 能不能在嵌套group by
- 关于执行计划的解读,聚集索引,in的方式查询
- 关于Order By(TSQL问题)
- SQL Server 中多行多列连接成为单行多列
- 如何在一个进程中查看另一个进程中打开的数据库信息?
- 请教leimin(黄山光明顶) 、caiyunxia(monkey):分组后如何得到组号呢?
- 关于Access中的备注字段用流读写的问题,再次请教"过江项羽",也欢迎其他高手解答
- 请问定义某一列default约束的sql语句??
- sql语句?请指教
create table stora_step(sid int primary key)
create table Product(Pcode char(15) primary key)--楼主自己的语句
create table stora_stock
( STID int identity(1,1) primary key,
SID int not null,
Pcode Char(15) not null,
foreign key (SID) references stora_step (SID) On Update Cascade,
foreign key (Pcode) references Product (Pcode) On Update Cascade,
)
go--显示是否创建了这些表
select name from sysobjects where name in('stora_stock','stora_step','Product')
go--删除测试表
drop table stora_stock,stora_step,Product/*--测试结果
name
-------------------
Product
stora_step
stora_stock(所影响的行数为 3 行)--*/
原来不支持啊,真是晕
谢谢了!