Re: "Counting" rows
Daniel Guerrero wrote:
> as you see the first column is created dynamic and shows the order of the sort, not other
> field; and if this could also decrement in DESC sort mode, it would be terrific.
SELECT @counter := COUNT(*) + 1 FROM yourtable;
SELECT @counter := @counter-1 AS Counter, yourtable.* FROM yourtable ORDER BY yourcolumn;
--
felix
Please use
BBCode to format your messages in this forum.
Subject
Written By
Posted
Re: "Counting" rows
January 03, 2006 05:07AM
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.