陈斌彬的技术博客

Stay foolish,stay hungry

Sql建表语句中不明的字符串

create table  HR_Attendance(
attendanceid int identity(1,1) not null,
employeeid varchar(50) not null,
checkmonth varchar(50) null,
checkyear varchar(50) null,
alldays int null,
erranddays int null,
illdays int null,
affairdays int null,
absentdays int null,
holidaydays int null,
negaticedays int null,
lateminutes int null,
earyminutes int null,
overtimedays int null
constraint pk_HR_attendance primary key clustered
(attendanceid asc)
with(pad_index=off,statistics_norecompute=off,ignore_dup_key=off,all_row_locks=on,allow_page_locks=on)on primary
)on primary

约束那段是对主键属性的 (attendanceid asc)with(pad_index=off,statistics_norecompute=off,ignore_dup_key=off,all_row_locks=on,allow_page_locks=on)on primary PAD_INDEX

指定填充索引的内部节点的行数,至少应大于等于两行。PAD_INDEX 选项只有在FILLFACTOR 选项指定后才起作用。因为PAD_INDEX 使用与FILLFACTOR 相同的百分比。缺省时,SQL Server 确保每个索引页至少有能容纳一条最大索引行数据的空闲空间。如果FILLFACTOR 指定的百分比不够容纳一行数据S,QL Server 会自动内部更改百分比。 STATISTICS_NORECOMPUTE 指定分布统计不自动更新。需要手动执行不带NORECOMPUTE 子句的UPDATESTATISTICS 命令。 IGNORE_DUP_KEY 此选项控制了当往包含于一个惟一约束中的列中插入重复数据时SQL Server 所作的反应。当选择此选项时,SQL Server 返回一个错误信息,跳过此行数据的插入,继续执行下面的插入数据的操作:当没选择此选项时,SQL Server 不仅会返回一个错误信息,还会回滚(Rolls Back)整个INSERT 语句 all_row_locks 是否允许行锁 allow_page_locks 是否允许页面锁 当然 on 和 off 就是打开 和 关闭了

Resource Reference