我创建索引的语句如下
create nonclustered index IX_transInfo_cardID
on transInfo(cardID)
with fillfactor=70
select * from transInfo (INDEX=IX_transInfo_cardID) where cardID='1010 3576 1212 1134'
cardID是transInfo表的外键
遇到的问题如下
Msg 1018, Level 15, State 1, Line 7
Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.
create nonclustered index IX_transInfo_cardID
on transInfo(cardID)
with fillfactor=70
select * from transInfo (INDEX=IX_transInfo_cardID) where cardID='1010 3576 1212 1134'
cardID是transInfo表的外键
遇到的问题如下
Msg 1018, Level 15, State 1, Line 7
Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax.
解决方案 »
- 按日期分组 查询问题~ 100分!
- 从多个表中查询符合条件的记录的条数(急,在线等!)
- sqlserver2000中,使用log函数问题
- 问个问题:怎么将HMTL网页内容导入到数据库中去?
- 远程怎么truncate 表
- 难题之存储过程语句优化问题!
- 请教高手:查询添加记录最晚的表的名称
- 存储过程SELECT语句中如何调用另一SELECT语句进行值判断
- 将表table_a中的字段fieldA、fieldB、fieldC的内容写入table_B中字段fieldA、fieldB、fieldC,应该怎样写??
- 请问客户端动态加入一个字段怎么加??
- 请教一个sql语句 关于子查询的 请高手热心指点
- SQL2000设计表的时候 nvarchar类型大小怎么算
select * from transInfo with (INDEX=IX_transInfo_cardID) where cardID='1010 3576 1212 1134'
Msg 308, Level 16, State 1, Line 7
Index 'IX_transInfo_cardID' on table 'transInfo' (specified in the FROM clause) does not exist.
on transInfo(cardID)
with fillfactor=70goselect * from transInfo with(INDEX=IX_transInfo_cardID) where cardID='1010 3576 1212 1134'