James和Alice的value有断层,想选择出来他们两个人的所有值,而不只是断层的那一行。
select
from table a,
join table b
on a.id = b.id-1 and a.name = b.name
where b.value - a.value <> 1
但是我这样的SQL只能显示出错的某一行。。。。
谢谢大家!!!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证0级讲师