woo*_*gie 1 sql sql-server subquery sql-server-2008
只是在SQL Server中使用子查询(我知道这个问题不必用子查询完成,但我想知道我的语法问题在哪里)
select count(*) from
( select id, totalcharges from tblVisits where (totalcharges <10000))
Run Code Online (Sandbox Code Playgroud)
我想你需要命名你的子查询 - 例如在这里将它别名为"t":
select count(*) from
( select id, totalcharges from tblVisits where (totalcharges <10000)) t
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
274 次 |
| 最近记录: |