标签:order https keyword detail 方法 sel view creat oat
表结构如下:
create table HH_BOOK_GOOD
(
ID VARCHAR2(32) not null,
BOOKID VARCHAR2(32) not null,
GOODID VARCHAR2(32) not null,
GOODPRICE FLOAT not null,
GOODNAME VARCHAR2(256) not null,
GOODNOTE VARCHAR2(1024) not null
)
select distinct ID,BOOKID,GOODPRICE from HH_BOOK_GOOD order by GOODID;
报ORA-01791:不是SELECTed表达式
解决方法
1、将此字段加入到select之后
select distinct ID,BOOKID,GOODPRICE,GOODID from hh_book_good order by GOODID;
select ID,BOOKID,GOODPRICE
from(select distinct ID,BOOKID,GOODPRICE,GOODID from HH_BOOK_GOOD)
order by GOODID;
再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow
Oracle查询错误分析 ORA-01791 不是SELECTed表达式
标签:order https keyword detail 方法 sel view creat oat
原文地址:https://www.cnblogs.com/skiwnchqhh/p/10334187.html