accesser2003
Registered User.
- Local time
- Tomorrow, 01:41
- Joined
- Jun 2, 2007
- Messages
- 124
I built a table [EmployeesAttendanceReportSource_Normal] using the SQL Statement as shown below. What I need is to add a descending sorting index for the column [AttDay].
How to rewrite this SQL statement to achieve this:
CREATE TABLE [dbo].[EmployeesAttendanceReportSource_Normal] (
[Indx] [int] NULL ,
[Department] [nvarchar] (90) NULL,
[ShortDay] [nvarchar] (50) NULL,
[AttDay] [SmallDateTime] NULL,
[ID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EmployeesAttendanceReportSource_Normal] WITH NOCHECK ADD
CONSTRAINT [PK_EmployeesAttendanceReportSource_Normal] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
GO
GRANT REFERENCES , SELECT , UPDATE , INSERT , DELETE ON [dbo].[EmployeesAttendanceReportSource_Normal] TO [public]
GO
How to rewrite this SQL statement to achieve this:
CREATE TABLE [dbo].[EmployeesAttendanceReportSource_Normal] (
[Indx] [int] NULL ,
[Department] [nvarchar] (90) NULL,
[ShortDay] [nvarchar] (50) NULL,
[AttDay] [SmallDateTime] NULL,
[ID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[EmployeesAttendanceReportSource_Normal] WITH NOCHECK ADD
CONSTRAINT [PK_EmployeesAttendanceReportSource_Normal] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
GO
GRANT REFERENCES , SELECT , UPDATE , INSERT , DELETE ON [dbo].[EmployeesAttendanceReportSource_Normal] TO [public]
GO