在mySQL
考虑以下查询:根据文档,OR和和运营商具有相同的优先级。 Therefore, this query can be interpreted in two ways:
Parentheses first:
((display = 1) OR (display = 2)) AND ((content LIKE "%hello world%") OR (tags LIKE "%hello world%") OR (title LIKE "%hello world%'))SELECT * FROM tablename WHERE display = 1 OR display = 2 AND content LIKE "%hello world%" OR tags LIKE "%hello world%" OR title LIKE "%hello world%";左右评估:
从tableName中选择 * 在哪里 (Display = 1或Display = 2)和 (诸如“%hello world%”或“%hello world%”或“%hello hello world%”之类的标签之类的内容)
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3