首页 | 本学科首页   官方微博 | 高级检索  
     检索      

SQL SERVER中自动标识列的改进
引用本文:陈斌.SQL SERVER中自动标识列的改进[J].南通职业大学学报,2005,19(4):55-57.
作者姓名:陈斌
作者单位:南通职业大学,电子工程系,江苏,南通,226007
摘    要:通过将用户自定义函数作为列的默认值和在列上使用触发器,解决了SQL SERVER中的自动标识列存在的两个问题:一是自动标识列的初始值只能是整型的数据,而无法使用包含字母的文本型数据或包含前导零的文本型数据;二是删除表中的若干条记录或是删除记录后再插入记录将导致表中记录在该列上的值不连续。

关 键 词:SQL  SERVER  自动标识列  用户自定义函数  触发器
文章编号:1008-5327(2005)04-0055-03
收稿时间:2005-11-15
修稿时间:2005年11月15

Improving Identify Field of SQL SERVER
CHEN Bin.Improving Identify Field of SQL SERVER[J].Journal of Nantong Vocational College,2005,19(4):55-57.
Authors:CHEN Bin
Abstract:There are two faults in identify field of SQL SERVER:the first,the initial value of the identify field can only be integrate data,and either textual value with capitals or textual value with zero in front of it is not allowed;the second,while delete some records of the table or delete some records of the table and then insert someone,the values of this field won't continue.This paper solves the problems above by using user define function as the default value of identify fields and binding trigger on identify fields.
Keywords:SQL SERVER  identify field  user define function  triggers
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号