sql - How can I construct a query to show an auto-incremented number? -


how can construct query show auto-incremented number?

i have query, select * data, results in:

name    state         malaysia   b       indonesia   

i want this:

no      name    state   1             malaysia   2       b       indonesia   

how might this?

select name , state , rank() on (order name, state) ranking data 

Comments