|
-
Feb 16th, 2004, 04:01 AM
#1
Thread Starter
Fanatic Member
insert database not in order
how come when i insert different sets of data ...i got the order all mess up? is this the norm?( yes though i can re-arrange by order)
-
Feb 16th, 2004, 07:37 AM
#2
Fanatic Member
The order you insert records is the order they appear in the table.
You could always have a clustered index to get the order you want, depending upon which database you're using
-
Feb 16th, 2004, 09:25 AM
#3
Thread Starter
Fanatic Member
i am using sql sever...how do i use clustered index?
-
Feb 16th, 2004, 10:18 AM
#4
Originally posted by Bonker Gudd
The order you insert records is the order they appear in the table.
You could always have a clustered index to get the order you want, depending upon which database you're using
That's a poor way to use clustered indexing... and not the purpose of it either. If you want your recordset in a particular order, use an Order By on the SELECT.
Bonker is right in that the records appear in the order they appear in the table. There could be a couple of reasons they appear in the order they do. 1)It's filling old holes left by deletes. 2) There already is some kind of clustering on the table,
TG
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|