📜  连续数字sql代码示例

📅  最后修改于: 2022-03-11 15:05:27.629000             🧑  作者: Mango

代码示例1
SELECT DISTINCT l1.Num AS ConsecutiveNums FROMLogs AS l1, Logs AS l2, Logs AS l3WHERE l1.Num = l2.Num AND l2.Num = l3.Num ANDl1.Id = l2.Id - 1 AND l2.Id = l3.Id - 1;