Guest User

Untitled

a guest
Aug 14th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. mysql hierarchical queries
  2. SELECT @id :=
  3. (
  4. SELECT senderid
  5. FROM mytable
  6. WHERE receiverid = @id
  7. ) AS person
  8. FROM (
  9. SELECT @id := 5
  10. ) vars
  11. STRAIGHT_JOIN
  12. mytable
  13. WHERE @id IS NOT NULL
Add Comment
Please, Sign In to add comment