SQL2000 增加自动排序列
select pid=identity(int,1,1),p_id,p_path,p_zoom,p_title,p_bewrite,a_id into TableBak
from t_photo p,t_user u
where a_id=17 and u.u_id=10
select * from TableBak
drop table TableBak
from t_photo p,t_user u
where a_id=17 and u.u_id=10
select * from TableBak
drop table TableBak
SQL查询增加序号
使用临时表