当前位置:网站首页>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 !!!!!!!!!!!!!
边栏推荐
猜你喜欢
随机推荐
876. Intermediate node of linked list
In flinksql, in addition to data statistics, is the saved data itself a state
Don't just learn Oracle and MySQL!
Oracle with as ORA-00903: invalid table name 多表报错
.NET ORM框架HiSql实战-第二章-使用Hisql实现菜单管理(增删改查)
Shell programming core technology "three"
Download the first Tencent technology open day course essence!
The 300th weekly match of leetcode (20220703)
大佬们,求助一下,我用mysql cdc 2.2.1(flink 1.14.5)写入kafka,设置
Angry bird design based on unity
整理混乱的头文件,我用include what you use
测试工程师如何“攻城”(上)
2022 ByteDance daily practice experience (Tiktok)
Pytest 可视化测试报告之 Allure
升级智能开关,“零火版”、“单火”接线方式差异有多大?
2014 Hefei 31st youth informatics Olympic Games (primary school group) test questions
用实际例子详细探究OpenCV的轮廓绘制函数drawContours()
2022CoCa: Contrastive Captioners are Image-Text Fountion Models
MySQL数据库基本操作-DDL | 黑马程序员
大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行









