有没有办法一起查询别名和分区?

Is there a way querying alias and partition together?

我想查询

select enp.LAST_NAME from EMPLOYEES enp partition("P20120101");

当我尝试时,oracle 说;

> ORA-00924: missing BY keyword

有没有办法把别名和分区一起使用?

正确的语法是

FROM <TABLE_NAME> PARTITION(<PARTITION_NAME>) <ALIAS_NAME>

所以, 尝试 select enp.LAST_NAME from EMPLOYEES partition("P20120101") enp;