select row_number() over(order by c.id1) k ,c.* from (select a.id id1,b.id id2 from tb_st_device a , tb_station b ) c