|
Posted by Captain Paralytic on 07/25/07 14:02
On 25 Jul, 14:44, zach <wackzi...@gmail.com> wrote:
> Is there a way to sort all the data in my database such as alphabetical
> or something, and then once sorted and have all the primary key's redone
> according to the sorted order? I can sort them how I want, but I don't
> know if there is a way to rename the primary id key on all the data once
> sorted.
>
> Thanks for any help.
>
> zach
Why does it matter? Your primary key is a way to uniquely identify the
record. The database system can store them in any order it wants.
If the primary key for a row is FR67T before the table is sorted, then
it can still be the primary key after?
If you want a simple integer value primary key, then (depending on the
RDBMS you are using)you can use a counter to insert the records in a
new table with the required values or possibly use an auto-increment
column.
Navigation:
[Reply to this message]
|