节点文献
SQL SERVER中自动标识列的改进
Improving Identify Field of SQL SERVER
【摘要】 通过将用户自定义函数作为列的默认值和在列上使用触发器,解决了SQLSERVER中的自动标识列存在的两个问题:一是自动标识列的初始值只能是整型的数据,而无法使用包含字母的文本型数据或包含前导零的文本型数据;二是删除表中的若干条记录或是删除记录后再插入记录将导致表中记录在该列上的值不连续。
【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.
【关键词】 SQLSERVER;
自动标识列;
用户自定义函数;
触发器;
【Key words】 SQL SERVER; identify field; user define function; triggers;
【Key words】 SQL SERVER; identify field; user define function; triggers;
- 【文献出处】 南通职业大学学报(综合版) ,JOURNAL OF NANTONG VOCATIONAL COLLEGE , 编辑部邮箱 ,2005年04期
- 【分类号】TP311.13
- 【下载频次】39