|
Data is stored in your table in no particular order. The exact mechanics depend on your database, but because of caching and everything else the db does, and because of the way relational theory works, there's no "natural order" and data normally isn't stored in the order you enter it. The order the records come in makes no difference under relational theory.
So if you have your own reasons to keep the records in a particular order, well, presently you don't have a mechanism for that. You have a bunch of numbers that are duplicated. And then you have some text. Those are the two things available for the database engine to sort your data on in your select query. ( Even with no order by clause, one is implied by your table and index definition. )
It sounds like what you want to do is add an identity column, before adding the new data. An identity data type is one managed and generated by the server, that typically goes like this: 1, 2, 3, 4, 5, and so on. Usually people use them to create a single, unique value that any row can be identified by, but for what you're trying to do, they're also a good tool.
|