ROW_NUMBER () function in mysql query

If you want to print the designation wise from employees list in order by column wise useing this 

ex : query

select min(doctor), min(professor), min(singer), min(actor) from ( select

ROW_NUMBER() OVER (PARTITION BY Occupation order by Name) occ_name


explanation:

in this query

Occupation is table name and Name is column name

ROW_NUMBER() function is useing a temporary value calculated when the query is run

Sign In or Register to comment.