在mysql中给查询的结果添加序号列
SELECT * FROM (
SELECT
(@i:=@i+1) as i, id, data_send_time
FROM
jl_pims_machine_time mt,(select @i:=0) as it order by mt.id desc
) tmp
WHERE
i IN (1,3,5)
只言片语任我说,提笔句句无需忖。落笔不知寄何人,唯有邀友共斟酌。
SELECT * FROM (
SELECT
(@i:=@i+1) as i, id, data_send_time
FROM
jl_pims_machine_time mt,(select @i:=0) as it order by mt.id desc
) tmp
WHERE
i IN (1,3,5)