当前位置:网站首页>Oracle with as ora-00903: invalid table name multi report error
Oracle with as ora-00903: invalid table name multi report error
2022-07-04 19:25:00 【kjshuan】
There is a problem today with as Error will be reported if used for many times !!
I can't check a lot of information online !
order Is a reserved word , If you use it carelessly order This word can only be enclosed in double quotation marks "order" operation
subject This is it
The first time I tried to use a single table with as The normal operation !!
with sss as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid=01)
2 select * from sss
3 ;CNAME ABCD SID
---------- ---------- ----------
mathematics 02 01
Chinese language and literature 01 01
English 03 01
with t as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid!=01)
2 select * from t;CNAME ABCD SID
---------- ---------- ----------
English 03 02
mathematics 02 02
Chinese language and literature 01 02
sports 04 03
English 03 03
mathematics 02 03
Chinese language and literature 01 03
sports 04 04
English 03 04
sports 04 04
Chinese language and literature 01 04CNAME ABCD SID
---------- ---------- ----------
mathematics 02 05
English 03 05
English 03 06
Chinese language and literature 01 06
sports 04 07
mathematics 02 07
English 03 07
But I want to 2 Table associated query The following error occurred
with sss as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid=01),
with t as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid!=01)
2 3 select * from t,sss;
with t as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid!=01)
*
ERROR at line 2:
ORA-00903: invalid table name
The translation is very clear Invalid table name !!( If the table name is clearly right, why is it invalid ????)
Later, I found many wtih Success after removal
SQL> ;
1 with sss as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid=01),
2 with t as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid!=01)
3* select * from t,sss
with sss as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid=01),
t as (select cc.cname,cc.cid abcd,ss.sid from course cc,sc scc,student ss where cc.cid=scc.cid and scc.sid=ss.sid and ss.sid!=01)
2 3 select * from t,sss;
CNAME ABCD SID CNAME ABCD SID
---------- ---------- ---------- ---------- ---------- ----------
English 03 02 Chinese language and literature 01 01
English 03 02 mathematics 02 01
Be careful 1 Multiple tables with as Get rid of the back
Be careful 2 Multiple tables with as Add a comma in the middle
The data is successfully found !!!!!!!!!!!!!
边栏推荐
猜你喜欢
[release] a tool for testing WebService and database connection - dbtest v1.0
升级智能开关,“零火版”、“单火”接线方式差异有多大?
node_exporter部署
Safer, smarter and more refined, Chang'an Lumin Wanmei Hongguang Mini EV?
关于判断点是否位于轮廓内的一点思考
Go微服务(二)——Protobuf详细入门
2022CoCa: Contrastive Captioners are Image-Text Fountion Models
基于lex和yacc的词法分析器+语法分析器
Oracle with as ORA-00903: invalid table name 多表报错
One question per day (2022-07-02) - Minimum refueling times
随机推荐
Scala basic tutorial -- 17 -- Collection
Shell programming core technology "I"
Pb extended DLL development (super chapter) (VII)
The difference and usage between substr (), slice (), and substring () in the string interception methods of "understand series after reading"
Torchdrug tutorial
问下各位大佬有用过cdc直接mysql to clickhouse的么
From automation to digital twins, what can Tupo do?
Wireshark网络抓包
.NET ORM框架HiSql实战-第二章-使用Hisql实现菜单管理(增删改查)
2022养生展,健康展,北京大健康展,健康产业展11月举办
自由小兵儿
OpenCV的二值化处理函数threshold()详解
国元期货是正规平台吗?在国元期货开户安全吗?
Unity给自己的脚本添加类似编辑器扩展的功能案例ContextMenu的使用
Unity编辑器扩展C#遍历文件夹以及子目录下的所有图片
Perfect JS event delegation
2022健康展,北京健博会,中国健康展,大健康展11月13日
读写关闭的channel是啥后果?
【OpenCV入门到精通之九】OpenCV之视频截取、图片与视频互转
【uniapp】uniapp开发app在线预览pdf文件