SQL中如何创建非聚集索引
本人对SQL优化方面知识了解较少,还请大师们赐教!
提示说缺少索引,
USE [ERP]
GO
CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [dbo].[HR_KhIntervalDetail] ([KhInterval],[KhClass],[KhYear])
INCLUDE ([JxkhGUID])
GO
*/
不知道 下一步 我该如何创建?
------解决方案--------------------
复制-粘贴到SSMS中,按F5执行.
------解决方案--------------------
USE [ERP]
GO
CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [dbo].[HR_KhIntervalDetail] ([KhInterval],[KhClass],[KhYear])
INCLUDE ([JxkhGUID])
GO
把这段代码复制到SQL Server Management Studio中,然后选中按F5即可