我正在尝试运行在 select 语句中使用子查询的查询。
这有效:
select
(select sysdate from dual),
(select 'municipality' from dual),
(select count(*) from municipality)
from dual;
但是生成的列名很难看,因此我想添加列别名。
我正在尝试运行以下查询:
select
(select sysdate from dual) as sysdate,
(select 'municipality' from dual) as tablename,
(select count(*) from municipality) as count
from dual;
这失败了 ORA 00923: From keyword not found where expected 错误。不知何故,我错过了一些东西。
有什么建议么?
谢谢。