set @i = 0; select @i := @i+1 as myrow, customer_id, first_name, last_name, email, active from sakila.customer;
-- OR --
select @rownum := @rownum+1 as mySeq, customer_id, last_name, first_name, email, active from sakila.customer c, (SELECT @rownum := 0) as r order by last_name desc ,first_name desc limit 0,10;
No comments:
Post a Comment
NO JUNK, Please try to keep this clean and related to the topic at hand.
Comments are for users to ask questions, collaborate or improve on existing.