daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 0
  2. 85
  3. 1
  4. 35
  5. 2
  6. 38
  7. 3
  8. 19
  9. 4
  10. ...
  11.    
  12. SELECT
  13.   @rownum0:=@rownum0+2 rn,
  14.   f.*
  15. FROM ( SELECT * FROM foo ORDER BY id ) f, (SELECT @rownum0:=0) r
  16. UNION
  17. SELECT @rownum1:=@rownum1+2 rn,
  18.   b.*
  19. FROM ( SELECT * FROM bar ORDER BY RAND() ) b, (SELECT @rownum1:=-1) r
  20. ORDER BY rn
  21. LIMIT 100
  22.    
  23. SELECT * FROM foo ORDER BY id LIMIT 50 UNION SELECT * FROM foo ORDER BY RAND() LIMIT 50
  24.    
  25. SELECT * FROM foo ORDER BY id LIMIT 50 UNION SELECT * FROM foo ORDER BY RAND() LIMIT 50
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top