本文介绍了主键选择问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在设计一个员工信息数据库.我通常为每个表保留一个自动递增的ID主键.但是,还有一个唯一的employeeID字段.现在的问题是我想知道选择自动递增的主键更好还是选择varchar,用户将提供输入?此主键已在许多其他表中用作外键.我正在使用严重的MSSQL2008.请帮助...
I am designing a employee information database. I usually keep an auto incremented ID primary key for each table. But there is also a unique employeeID field. Now problem is i want to know choosing a auto incremented primary key is better or choosing a varchar , that the user will give input? This primary key has been used as foreign key in many other tables. I am using MSSQL severe 2008. Please help......
推荐答案
这篇关于主键选择问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!