sql 根据下一条的数据显示上一条数据

2024-12-19 05:57:10
推荐回答(4个)
回答1:

<%
t1=tt-1
t2=tt+1
%>
上一条数据&table=<%=talbe%>">下一条数据

加入到页面即可

回答2:

select a.* from a59 a
where a.keyid='0000000001' and a.a5903=2
and exists(select 1 from a59 where keyid=a.keyid and a5904='失败' and orderid=(select min(orderid) from a59 where keyid=a.keyid and orderid>a.orderid))

回答3:

select * from a59 a
where a.a5903='2' and exists (select 1 from a59 b where a.keyld=b.keyld and b.a5904='失败')

这样??

回答4:

没看懂, 应该不是直接 where A5903 =2 and A5904=失败 对吧