Guest User

Untitled

a guest
Jul 15th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. root@localhost/test>desc t1;
  2. +-------+---------+------+-----+---------+-------+
  3. | Field | Type | Null | Key | Default | Extra |
  4. +-------+---------+------+-----+---------+-------+
  5. | c1 | int(11) | YES | | NULL | |
  6. +-------+---------+------+-----+---------+-------+
  7. 1 row in set (0,00 sec)
  8.  
  9. root@localhost/test>select * from t1;
  10. +------+
  11. | c1 |
  12. +------+
  13. | 1 |
  14. | 2 |
  15. | 3 |
  16. | 4 |
  17. | 5 |
  18. +------+
  19. 5 rows in set (0,00 sec)
  20.  
  21. root@localhost/test>select * from t1 where c1 in (1,2,3) and c1 not in (select 3);
  22. +------+
  23. | c1 |
  24. +------+
  25. | 1 |
  26. | 2 |
  27. +------+
  28. 2 rows in set (0,00 sec)
Add Comment
Please, Sign In to add comment