在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