== MySQL版本版

set @rownum =0
select @rownum:=@rownum+1 ,c1
from table1

==人大金仓版

select ROW_NUMBER() OVER() ,c1
from table1