Skip to content

Instantly share code, notes, and snippets.

@maletor
Last active May 17, 2018 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maletor/00304f5f38635d7005285a724f8c96b9 to your computer and use it in GitHub Desktop.
Save maletor/00304f5f38635d7005285a724f8c96b9 to your computer and use it in GitHub Desktop.
Table
-----
id msg_id name
1 | 1 | Tom
2 | 1 | Dick
3 | 1 | Harry
4 | 2 | Tom
5 | 2 | Dick
6 | 3 | Tom
7 | 3 | Dick
8 | 3 | Harry
@maletor
Copy link
Author

maletor commented May 17, 2018

select * from table where name = "Tom" or name = "Dick"

Should return only row 2, but returns row 1, 2 and 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment