当前位置:网站首页>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 !!!!!!!!!!!!!
边栏推荐
猜你喜欢
基于lex和yacc的词法分析器+语法分析器
自由小兵儿
Scala basic tutorial -- 15 -- recursion
关于判断点是否位于轮廓内的一点思考
One question per day (2022-07-02) - Minimum refueling times
2022 ByteDance daily practice experience (Tiktok)
物联网应用技术的就业前景和现状
英特尔集成光电研究最新进展推动共封装光学和光互连技术进步
Stream流
2022CoCa: Contrastive Captioners are Image-Text Fountion Models
随机推荐
大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行
876. Intermediate node of linked list
MySQL数据库基本操作-DDL | 黑马程序员
26. Delete the duplicate item C solution in the ordered array
Cache é JSON uses JSON adapters
神经网络物联网应用技术就业前景【欢迎补充】
[go ~ 0 to 1] read, write and create files on the sixth day
模板_大整数减法_无论大小关系
Using SSH
工厂从自动化到数字孪生,图扑能干什么?
2014 Hefei 31st youth informatics Olympic Games (primary school group) test questions
LeetCode 赎金信 C#解答
In flinksql, in addition to data statistics, is the saved data itself a state
测试工程师如何“攻城”(上)
The 300th weekly match of leetcode (20220703)
整理混乱的头文件,我用include what you use
使用canal配合rocketmq监听mysql的binlog日志
建立自己的网站(15)
Is Guoyuan futures a regular platform? Is it safe to open an account in Guoyuan futures?
2022-07-04: what is the output of the following go language code? A:true; B:false; C: Compilation error. package main import 'fmt' func