1. Single Condition query: Select field name from TableName where condition;
2, simple multi-criteria query, using && or between and etc.:
3, is null and is not NULL query, here to note that NULL is not an empty string not 0:
4, in and not in queries are equivalent to connecting the set elements behind in with or. Note that if NULL is present in the collection in the back band, the result is not affected, but there is null in the collection behind not, and no results are investigated, and no in also does not find null:
5. Like fuzzy query (not only for strings): The query begins or ends with a character or a few characters or the middle contains:%
If you want the opposite logic, you can use not, there are two slightly different ways of writing:
You can also use _ (underscore) as a placeholder, for example The following example indicates that the third letter is S (two underscores), the second letter is S (an underscore):
You can use not as well here.
MySQL Common basic operation Syntax (v)--Simple conditional query on data "command line mode"