SQL code: select *,id=(select count(1)+1 from tb where user_id<a.user_id) from tb a
ÕâÌõ¾ä×ÓÖÐµÄ where user_id<a.user_idÊÇÔõô±È½ÏµÄ user_idºÍa.user_id²»ÊÇÓ¦¸ÃÏàͬµÄÂð£¿ÎªÊ²Ã´´øÉÏÕâÌõwhereºóidµÄÖ®¾ÍÊÇ1£¬2£¬3£¬4£¬5£¬6£¬7.....
------------------------------------------- ×ÔѧºÜÀÛ£¬ÓÐʱºòºÜ¼òµ¥µÄÎÊÌâÒª¿´ºÜ³¤Ê±¼ä£¬Ï£Íû´ó¼Ò°ï°ïæselect *,id=(select count(1)+1 from tb where user_id<a.user_id) from tb a
select *,id=(select count(1) from tb where user_id<a.user_id) + 1 from tb a
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001' ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......