oracle中有rownum函数,可以直接使用。例如:
select rownum as 序号, t.city_name as 城市, t.city_address as 地址 from ct_exh_city t order by t.exh_city_id asc;
mysql中没有rownum函数,
select @n:=@n+1 as 序号, t.* from bd_city t, (select @n:=0) d;
oracle中有rownum函数,可以直接使用。例如:
select rownum as 序号, t.city_name as 城市, t.city_address as 地址 from ct_exh_city t order by t.exh_city_id asc;
mysql中没有rownum函数,
select @n:=@n+1 as 序号, t.* from bd_city t, (select @n:=0) d;