Question10: How can I li

18 查阅
Question10: How can I list non-contignous data?In database pubs, I create a table test using stateme

参考答案:

正确答案:
Answer 10:
select id from test t where not exists(select 1 from test where id=t.id+1)
or not exists(select 1 from test where id=t.id-1)