重庆思庄Oracle、Redhat认证学习论坛

标题: Oracle 11g数据加密之使用限制(distinct与order by) [打印本页]

作者: miss_puff    时间: 2018-2-1 14:16
标题: Oracle 11g数据加密之使用限制(distinct与order by)
对加密列同时使用distinct和order by,报语法错误,该问题已确认为bug,Bug号19558306。


SQL> show user;
USER is "SZTECH"
SQL> select distinct phone_number from student;


PHONE_NUMBER
-------------
130-9677-0491
130-5820-0888
130-2345-6789


SQL> select distinct phone_number from student order by phone_number;
select distinct phone_number from student order by phone_number
                *
ERROR at line 1:
ORA-01791: not a SELECTed expression




SQL>




可将SQL改成子查询:
SQL> select * from (select distinct phone_number from student order by phone_number);

PHONE_NUMBER
-------------
130-2345-6789
130-5820-0888
130-9677-0491

SQL>








欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2