<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # 14.12\. 子查詢 對于支持子查詢的數據庫,Hibernate支持在查詢中使用子查詢。一個子查詢必須被圓括號包圍起來(經常是SQL聚集函數的圓括號)。 甚至相互關聯的子查詢(引用到外部查詢中的別名的子查詢)也是允許的。 ``` from Cat as fatcat where fatcat.weight > ( select avg(cat.weight) from DomesticCat cat ) ``` ``` from DomesticCat as cat where cat.name = some ( select name.nickName from Name as name ) ``` ``` from Cat as cat where not exists ( from Cat as mate where mate.mate = cat ) ``` ``` from DomesticCat as cat where cat.name not in ( select name.nickName from Name as name ) ``` ``` select cat.id, (select max(kit.weight) from cat.kitten kit) from Cat as cat ``` 注意,HQL自查詢只可以在select或者where子句中出現。 在select列表中包含一個表達式以上的子查詢,你可以使用一個元組構造符(tuple constructors): ``` from Cat as cat where not ( cat.name, cat.color ) in ( select cat.name, cat.color from DomesticCat cat ) ``` 注意在某些數據庫中(不包括Oracle與HSQL),你也可以在其他語境中使用元組構造符, 比如查詢用戶類型的組件與組合: ``` from Person where name = ('Gavin', 'A', 'King') ``` 該查詢等價于更復雜的: ``` from Person where name.first = 'Gavin' and name.initial = 'A' and name.last = 'King') ``` 有兩個很好的理由使你不應當作這樣的事情:首先,它不完全適用于各個數據庫平臺;其次,查詢現在依賴于映射文件中屬性的順序。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看