久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='Iv7zl'></tfoot>

    <small id='Iv7zl'></small><noframes id='Iv7zl'>

      <legend id='Iv7zl'><style id='Iv7zl'><dir id='Iv7zl'><q id='Iv7zl'></q></dir></style></legend>

        <i id='Iv7zl'><tr id='Iv7zl'><dt id='Iv7zl'><q id='Iv7zl'><span id='Iv7zl'><b id='Iv7zl'><form id='Iv7zl'><ins id='Iv7zl'></ins><ul id='Iv7zl'></ul><sub id='Iv7zl'></sub></form><legend id='Iv7zl'></legend><bdo id='Iv7zl'><pre id='Iv7zl'><center id='Iv7zl'></center></pre></bdo></b><th id='Iv7zl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Iv7zl'><tfoot id='Iv7zl'></tfoot><dl id='Iv7zl'><fieldset id='Iv7zl'></fieldset></dl></div>
        • <bdo id='Iv7zl'></bdo><ul id='Iv7zl'></ul>

        Mysql 或/和優(yōu)先級?

        Mysql or/and precedence?(Mysql 或/和優(yōu)先級?)
        • <bdo id='yzHhy'></bdo><ul id='yzHhy'></ul>
            <tbody id='yzHhy'></tbody>

            <small id='yzHhy'></small><noframes id='yzHhy'>

              <i id='yzHhy'><tr id='yzHhy'><dt id='yzHhy'><q id='yzHhy'><span id='yzHhy'><b id='yzHhy'><form id='yzHhy'><ins id='yzHhy'></ins><ul id='yzHhy'></ul><sub id='yzHhy'></sub></form><legend id='yzHhy'></legend><bdo id='yzHhy'><pre id='yzHhy'><center id='yzHhy'></center></pre></bdo></b><th id='yzHhy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yzHhy'><tfoot id='yzHhy'></tfoot><dl id='yzHhy'><fieldset id='yzHhy'></fieldset></dl></div>

              <tfoot id='yzHhy'></tfoot>
              <legend id='yzHhy'><style id='yzHhy'><dir id='yzHhy'><q id='yzHhy'></q></dir></style></legend>

                  本文介紹了Mysql 或/和優(yōu)先級?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想知道 or/and 是如何工作的?

                  I am wondering how or/and works?

                  例如,如果我想獲取 display = 1 的所有行

                  For example if I want to get all rows where display = 1

                  我只能做WHERE tablename.display = 1

                  如果我想要 display = 1 或 2 的所有行

                  and if I want all rows where display = 1 or 2

                  我可以做WHERE tablename.display = 1 or tablename.display = 2

                  但是,如果我想獲取 display = 1 或 2 以及 任何 內容、標簽或標題包含 hello world

                  But what if I want to get all rows where display = 1 or 2 and where any of the content, tags, or title contains hello world

                  這個邏輯將如何發(fā)揮作用?

                  How would the logic play out for that?

                  Select * from tablename 
                  where display = 1 or display = 2 and content like "%hello world%" or tags like "%hello world%" or title = "%hello world%"
                  

                  這是我的猜測.但我可以通過多種方式閱讀.

                  Would be my guess. but then I can read that in several ways.

                  是否讀出為:

                   (display = 1 or display = 2) and (content like "%hello world%" or tags like "%hello world%" or title = "%hello world%")
                  

                  或作為

                  ((display = 1 or display = 2) and (content like "%hello world%")) or (tags like "%hello world%" or title = "%hello world%")
                  

                  推薦答案

                  MySQL 文檔有一個 良好頁面,其中包含有關哪些運算符優(yōu)先的信息.

                  The MySQL documentation has a good page with information on which operators take precedence.

                  從那個頁面,

                  12.3.1.運算符優(yōu)先級

                  12.3.1. Operator Precedence

                  運算符優(yōu)先級如下表所示,從最高優(yōu)先級到最低優(yōu)先級.運營商一起顯示在一行中具有相同的優(yōu)先級.

                  Operator precedences are shown in the following list, from highest precedence to the lowest. Operators that are shown together on a line have the same precedence.

                  INTERVAL
                  BINARY, COLLATE
                  !
                  - (unary minus), ~ (unary bit inversion)
                  ^
                  *, /, DIV, %, MOD
                  -, +
                  <<, >>
                  &
                  |
                  = (comparison), <=>, >=, >, <=, <, <>, !=, IS, LIKE, REGEXP, IN
                  BETWEEN, CASE, WHEN, THEN, ELSE
                  NOT
                  &&, AND
                  XOR
                  ||, OR
                  = (assignment), :=
                  

                  所以你的原始查詢

                  Select
                      *
                  from tablename 
                  where
                      display = 1
                      or display = 2
                      and content like "%hello world%"
                      or tags like "%hello world%"
                      or title = "%hello world%"
                  

                  會被解釋為

                  Select
                      *
                  from tablename 
                  where 
                      (display = 1)
                      or (
                          (display = 2)
                          and (content like "%hello world%")
                      )
                      or (tags like "%hello world%")
                      or (title = "%hello world%")
                  

                  如有疑問,請使用括號來明確您的意圖.盡管 MySQL 頁面上的信息很有幫助,但如果再次訪問該查詢,則可能不會立即顯而易見.

                  When in doubt, use parenthesis to make your intent clear. While the information on the MySQL page is helpful, it may not be immediately obvious if the query is ever revisited.

                  您可能會考慮以下內容.請注意,我已將 title = "%hello world%" 更改為 title like "%hello world%",因為這更符合您描述的目標.

                  You might consider something like the following. Note that I've changed the title = "%hello world%" to title like "%hello world%", since that fits better with the goal you've described.

                  Select
                      *
                  from tablename 
                  where
                      (
                          (display = 1)
                          or (display = 2)
                      ) and (
                          (content like "%hello world%")
                          or (tags like "%hello world%")
                          or (title like "%hello world%")
                      )
                  

                  這篇關于Mysql 或/和優(yōu)先級?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數(shù)根據(jù) N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數(shù)的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發(fā)技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環(huán)數(shù)組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發(fā)生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數(shù)據(jù)庫表作為 Spark 數(shù)據(jù)幀讀取?)
                      <legend id='wDV1t'><style id='wDV1t'><dir id='wDV1t'><q id='wDV1t'></q></dir></style></legend>
                      <tfoot id='wDV1t'></tfoot>
                      <i id='wDV1t'><tr id='wDV1t'><dt id='wDV1t'><q id='wDV1t'><span id='wDV1t'><b id='wDV1t'><form id='wDV1t'><ins id='wDV1t'></ins><ul id='wDV1t'></ul><sub id='wDV1t'></sub></form><legend id='wDV1t'></legend><bdo id='wDV1t'><pre id='wDV1t'><center id='wDV1t'></center></pre></bdo></b><th id='wDV1t'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wDV1t'><tfoot id='wDV1t'></tfoot><dl id='wDV1t'><fieldset id='wDV1t'></fieldset></dl></div>

                        <tbody id='wDV1t'></tbody>
                    1. <small id='wDV1t'></small><noframes id='wDV1t'>

                          <bdo id='wDV1t'></bdo><ul id='wDV1t'></ul>

                          • 主站蜘蛛池模板: 欧美综合国产精品久久丁香 | 天天色综| 在线色| 男女羞羞视频免费 | 一区| 羞羞视频在线观看网站 | 视频一区在线 | 视频一区二区中文字幕 | 欧美日韩不卡 | 99精品一区二区三区 | 婷婷国产一区二区三区 | 亚洲综合字幕 | 91麻豆精品国产91久久久久久 | 九九久久久 | 99久久精品免费看国产四区 | 在线观看国产wwwa级羞羞视频 | 国产精品99久久久久久www | www.青青草 | 欧美一区二区在线 | 亚洲精品国产偷自在线观看 | 久久精品色欧美aⅴ一区二区 | 久久精品国产亚洲一区二区 | 国产成人精品免费视频大全最热 | 免费一区| 成人九色 | 日本视频免费观看 | 国产无人区一区二区三区 | 自拍视频在线观看 | 九一视频在线观看 | 一级免费毛片 | 久久久99精品免费观看 | 91在线视频精品 | 国产精品69毛片高清亚洲 | 日本小电影在线 | av在线三级 | 欧美一级特黄aaa大片在线观看 | 亚洲免费一| 中文字幕在线观看av | 国产精品亚洲成在人线 | 97精品超碰一区二区三区 | 影音先锋亚洲资源 |