mysql中 查询语句中 的别名能做为where条件

当咱们使用别名做为输出列,咱们没法在Where条件中直接使用该列做判断条件.    例以下面的SQL语句:html select  `id`,(select  `name` from user where id=`user_id` )userName from home where userName="张三"   SQL Server 报错: "列名 userName 无效" code []Err
相关文章
相关标签/搜索