<i id='LDBjS'><tr id='LDBjS'><dt id='LDBjS'><q id='LDBjS'><span id='LDBjS'><b id='LDBjS'><form id='LDBjS'><ins id='LDBjS'></ins><ul id='LDBjS'></ul><sub id='LDBjS'></sub></form><legend id='LDBjS'></legend><bdo id='LDBjS'><pre id='LDBjS'><center id='LDBjS'></center></pre></bdo></b><th id='LDBjS'></th></span></q></dt></tr></i><div id='LDBjS'><tfoot id='LDBjS'></tfoot><dl id='LDBjS'><fieldset id='LDBjS'></fieldset></dl></div>
  • <small id='LDBjS'></small><noframes id='LDBjS'>

        <bdo id='LDBjS'></bdo><ul id='LDBjS'></ul>
      <legend id='LDBjS'><style id='LDBjS'><dir id='LDBjS'><q id='LDBjS'></q></dir></style></legend>
    1. <tfoot id='LDBjS'></tfoot>

      1. Where 子句中的未知列

        时间:2023-08-18
        <legend id='y3ttm'><style id='y3ttm'><dir id='y3ttm'><q id='y3ttm'></q></dir></style></legend>

          • <tfoot id='y3ttm'></tfoot>
              <bdo id='y3ttm'></bdo><ul id='y3ttm'></ul>

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

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

                • 本文介绍了Where 子句中的未知列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个简单的查询:

                  SELECT u_name AS user_name FROM users WHERE user_name = "john";
                  

                  我在 where 子句中得到 Unknown Column 'user_name'.即使在 select 'u_name as user_name' 之后,我也不能在语句的其他部分引用 'user_name' 吗?

                  I get Unknown Column 'user_name' in where clause. Can I not refer to 'user_name' in other parts of the statement even after select 'u_name as user_name'?

                  推荐答案

                  SQL 是从右到左向后评估的.所以 where 子句在 select 子句之前被解析和评估.因此,尚未发生 u_name 到 user_name 的别名.

                  SQL is evaluated backwards, from right to left. So the where clause is parsed and evaluate prior to the select clause. Because of this the aliasing of u_name to user_name has not yet occurred.

                  这篇关于Where 子句中的未知列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:更改“Mysql Row size too large"的限制 下一篇:MySQL根据另一个表值更新表

                  相关文章

                  最新文章

                  <tfoot id='j8MuS'></tfoot>

                  • <bdo id='j8MuS'></bdo><ul id='j8MuS'></ul>

                    1. <small id='j8MuS'></small><noframes id='j8MuS'>

                      <legend id='j8MuS'><style id='j8MuS'><dir id='j8MuS'><q id='j8MuS'></q></dir></style></legend>
                      <i id='j8MuS'><tr id='j8MuS'><dt id='j8MuS'><q id='j8MuS'><span id='j8MuS'><b id='j8MuS'><form id='j8MuS'><ins id='j8MuS'></ins><ul id='j8MuS'></ul><sub id='j8MuS'></sub></form><legend id='j8MuS'></legend><bdo id='j8MuS'><pre id='j8MuS'><center id='j8MuS'></center></pre></bdo></b><th id='j8MuS'></th></span></q></dt></tr></i><div id='j8MuS'><tfoot id='j8MuS'></tfoot><dl id='j8MuS'><fieldset id='j8MuS'></fieldset></dl></div>