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 SQL查询增加序号 使用临时表 转载于:https://www.cnblogs.com/cooolbin/archive/2008/02/29/1085897.html