« Oracle: source text for the view, package etc | Home | Oracle: using recycling bin »

mysql: rownum functionality

Select, update etc...


update mytable
set col1 = 'somevalue'
order by col2
limit 300

rownum analog:


select @rownum:=@rownum+1 rownum, mytable.*
from (select @rownum:=0) r, mytable;

Topics: MySQL, rowcount | Submitter: checkthis

Comments

You must be logged in to post a comment.