select id,p_uptime,p_username,p_userid,p_x,p_y,p_xy,p_filesize,p_filetype,p_shoottime,p_keyword,p_approve,p_click,p_dayclick,p_good,p_title,p_point,p_del,p_type,p_camera,p_edit,p_lasttime,p_daysclick,p_viewtype,p_best,p_ydayclick,p_bookmark,p_ip,p_ipfrom,p_rgb,p_rgb2,p_jing from (select *, ROW_NUMBER() OVER (order by p_uptime desc ) as Pos from photo where 1=1 and p_del=0 and (p_approve=1 and p_uptime<'2010-3-11 1:54:44' or p_userid=0) ) as T where T.Pos between 1 and 60