At 2:02 PM +0100 1999-12-27, Ludovic Cellier wrote:
>Paul DuBois wrote:
>> At 10:11 AM +0100 1999-12-27, Ludovic Cellier wrote:
>> >Hello all !
>> >I would like to know what is simplest way to sort a table by one of the
>> >I need to keep the same table name, the same columns and the same data.
>> Use an ORDER BY clause in your SELECT statement when you retrieve rows
>> from the table.
>> Paul DuBois, paul@stripped
>I don't want to sort the result of a select statement.
>I want to sort the datas IN the table.
That's not how relational databases work. They make no guarantee about
the order of rows in a table. That's what the ORDER BY clause is for.
>so if I just do a select * from thetable ;
>It gives me all the data, sorted.
>For the moment I have only one solution, but i'm looking for another.
>Create a tempory table, copy all the data sorted in that new table
>delete datas from the first one and pour it again from the temporary.
That works, but only as an accident of the current implementation.
As soon as you start deleting and inserting rows, you'll need to
do it again.
Paul DuBois, paul@stripped