Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
accesser2003
Starting Member
14 Posts |
Posted - 2008-07-03 : 12:18:06
|
| 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]GOALTER TABLE [dbo].[EmployeesAttendanceReportSource_Normal] WITH NOCHECK ADDCONSTRAINT [PK_EmployeesAttendanceReportSource_Normal] PRIMARY KEY CLUSTERED([ID]) ON [PRIMARY]GOGRANT REFERENCES , SELECT , UPDATE , INSERT , DELETE ON [dbo].[EmployeesAttendanceReportSource_Normal] TO [public]GO |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-07-03 : 12:38:05
|
| Open management studio - Expand table - right click index- create new index and choose however you want.Or Use create index command .Check Books online. |
 |
|
|
accesser2003
Starting Member
14 Posts |
Posted - 2008-07-03 : 12:47:59
|
| Please Help Me.Thanks, |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-07-03 : 12:48:35
|
| I already helped you. |
 |
|
|
|
|
|