SQLServer7 中Table的关系和Table的建立

ycdch 2000-07-21 04:13:00
在Access中一对多关系的二个表,在子表中用“自动编号”的ID字段来解决,而在SQLServer7.0中,子表的主关键字段怎么设?
谢谢!!
...全文
140 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
guoqy 2000-07-23
  • 打赏
  • 举报
回复
不能用复合字段吗?
ycdch 2000-07-21
  • 打赏
  • 举报
回复
galen621,
不过,听说外加主关键字段不是很好的处理方式,请问,有好的方法吗?
zzh 2000-07-21
  • 打赏
  • 举报
回复
可以用如下的SQL语句:create table table_name (auto_key int identity,first varchar(30) not null,last varchar(30) not null)
galen621 2000-07-21
  • 打赏
  • 举报
回复
即字段的identity属性,如果你要设置该字段为自动编号,可
1。设为数值类型
2。复选identity

ycdch 2000-07-21
  • 打赏
  • 举报
回复
galen621,
鄙人浅薄,啥叫“识别种子(Id) ”
galen621 2000-07-21
  • 打赏
  • 举报
回复
在SQL server中,自动编号为数值类型+识别种子(Id)
leslielu 2000-07-21
  • 打赏
  • 举报
回复
Enterprise Manager
right click the table
select Design table
then Click the tabel Properties
you will find the Key set.

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧