MySQL查询定义自增序列号
SELECT (@j := @j + 1) as id1,op_rsid,op_stage,op_man,op_result,op_time
FROM operate_history,(select @j := 0)b
WHERE op_stage='简历推荐' OR op_stage='面试'
ORDER BY op_rsid DESC,op_time
SELECT (@j := @j + 1) as id1,op_rsid,op_stage,op_man,op_result,op_time
FROM operate_history,(select @j := 0)b
WHERE op_stage='简历推荐' OR op_stage='面试'
ORDER BY op_rsid DESC,op_time
本文来自博客园,作者:Crazyinfo,转载请注明原文链接:https://www.cnblogs.com/crazyinfo/p/15611453.html