Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. select * from (
  2. select row_number() over (order by znachenie) as numbering, * from (
  3. select * from Table_1 where
  4. znachenie - 1 not in (select top 100 percent * from Table_1 order by znachenie) and
  5. (znachenie <> (select top(1) * from Table_1))
  6. union all
  7. select * from Table_1 where
  8. znachenie + 1 not in (select top 100 percent * from Table_1 order by znachenie))q )
  9. ew
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement