其他分享
首页 > 其他分享> > 给视图创建索引

给视图创建索引

作者:互联网

alter VIEW [dbo].[F_table_SCreateBarQty] with schemabinding
AS
SELECT F_SourceID,F_SourceEntry,SUM(F_Number) AS FBarQTY,COUNT_BIG(*) AS F FROM dbo.F_table
WHERE F_State<>8 and F_SourceType='MES_Delivery' AND F_CodeType=2 GROUP BY F_SourceID,F_SourceEntry
GO


create unique clustered index ix_uniquetb on F_table_SCreateBarQty(F_SourceID,F_SourceEntry)

 

标签:dbo,SourceID,创建,SourceEntry,视图,索引,SCreateBarQty,table
来源: https://www.cnblogs.com/liangyuwen/p/16068303.html