create table one(cloumn1 int primary key,clomun2 int)
create table two (cloumn3 int primary key,clomun4 unique foreign key references one(column1))
这就是典型的一对一create table one(cloumn1 int primary key,clomun2 int)
create table two (cloumn3 int primary key,clomun4 foreign key references one(column1))
这就是典型的一对多至于多对多,在数据库中一般是不用的
不过我还是写上
create table one(cloumn1 int primary key,clomun2 int foreign key references two(column3))
create table two (cloumn3 int primary key,clomun4 foreign key references one(column1))
我这是抛砖引玉啊,欢迎大家指教
create table two (cloumn3 int primary key,clomun4 unique foreign key references one(column1))
这就是典型的一对一create table one(cloumn1 int primary key,clomun2 int)
create table two (cloumn3 int primary key,clomun4 foreign key references one(column1))
这就是典型的一对多至于多对多,在数据库中一般是不用的
不过我还是写上
create table one(cloumn1 int primary key,clomun2 int foreign key references two(column3))
create table two (cloumn3 int primary key,clomun4 foreign key references one(column1))
我这是抛砖引玉啊,欢迎大家指教
解决方案 »
- 一个sql查询语句
- mssql定时作业问题
- 三个字段排序:data -> bit -> bit?怎样实现??
- 帮帮忙做题啊 小弟不解
- update中利用条件判断字段是否更新的问题~谢谢
- 变一个数据库理所有表的相关列(varchar,nvarchar,char)的collate
- 如何将一个记录从一个表移到另一个表???
- 如何获取任何年份的4个季度时间??
- 站点即将崩溃,sql server进程数超过130!英雄!救命!
- 为什么我的SQL SERVER 2000服务起来不到,说什么要注册,日志是:SQL Server evaluation period has expired.,怎么办?有朋友说我的是评估版,
- 参考“李洪根”大侠的代码写的分页存储过程,第一次写,不知道对不对,各位帮忙看看
- 如何知道当前表都与哪些表相关联?
多对多关系无法建成啊???原因是two表还未建成就被引用了,,,这怎么办啊???