MySQL Forums
Forum List  »  Newbie

Re: Help with table structure and function
Posted by: Phillip Ward
Date: April 16, 2014 05:20AM

Since the only [completely reliable] way to get rows in the order you want them is to use an "order by" clause, you need to add another column for that clause to work on:

select * from mytable 
order by seq ; 

+----+-----+---------+ 
| id | seq | name    | 
+----+-----+---------+ 
|  1 |   1 | reddit  | 
|  4 |   2 | youtube | 
|  2 |   3 | google  | 
|  3 |   4 | yahoo   | 
+----+-----+---------+

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: Help with table structure and function
April 16, 2014 05:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.