建立索引时列名在目标表或视图中不存在是怎么回事

img


创建的Student表存在SName这一列

-- 创建唯一聚集索引
create unique clustered        --表示创建唯一聚集索引
index UQ_Clu_SName       --索引名称
on Student(SName)        --数据表名称(建立索引的列名)
with 
(
    pad_index=on,    --表示使用填充
    fillfactor=50,    --表示填充因子为50%
    ignore_dup_key=on,    --表示向唯一索引插入重复值会忽略重复值
    statistics_norecompute=off    --表示启用统计信息自动更新功能
)