How can I save order in MySql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mariamik
    New Member
    • Jul 2007
    • 5

    How can I save order in MySql

    Hi.

    Suppose "section" is my table name in the "database".
    When i wrote "select * from setion order by name" at the same time I want to save this order at the save table. Is it possible.
    Thanks a lot.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    ORDER BY does not affect the physical order of data in the database. It only affects in the recordset. To save the order you need to insert the records in the same order into another table. But once you add a new record that will not be in the same order.

    Better to use a View for the purpose.

    Comment

    Working...