March 25, 2008 at 9:58 am
When I add rows to my database it committs the data any where in the database. What I want it to do is to committ the data in the logical chronological order that I have created during the design mode.
I have a colum dedicated to numerical labeling each row and I wish to keep this order how do I accomplish?
March 25, 2008 at 10:01 am
If all you want is to insure the rows are stored in insert order add a clustered index to the incrementing numeric column.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 25, 2008 at 10:21 am
Will that work if you do not have a primary ket set; cause I only have one table?
March 25, 2008 at 10:32 am
By default a primary key is created as the clustered index. You would need to drop the primary key, create a clustered index, and re-create the primary key as non-clustered.
ALTER TABLE YourTable DROP CONSTRAINT PK_YourTable
GO
Create CLustered Index YourIndiex on YourTable(YourColumn)
GO
Alter Table YourTable Add Constraint PK_YourTable
Primary Key NonClustered(yourColumn)
Go
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply