-- Execute All if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TblRYLUserStat]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[TblRYLUserStat] GO CREATE TABLE [dbo].[TblRYLUserStat] ( [nNation] [tinyint] NULL , [nServerID] [int] NULL , [nUserNum] [int] NULL , [tDateTime] [smalldatetime] NULL ) ON [PRIMARY] GO CREATE CLUSTERED INDEX [TblRYLUserStat1] ON [dbo].[TblRYLUserStat]([tDateTime] DESC , [nServerID]) ON [PRIMARY] GO