Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.24 KB | None | 0 0
  1. select case when id % 2 = 1 and id = records.count then id
  2.             when id % 2 = 1 then id + 1
  3.        else id - 1
  4.        end as id,
  5.        student
  6.        from seat,
  7.             (select count(*) as count from seat) as records
  8. order by id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement