当前位置:网站首页>Oracle查询提示 ORA-00933 SQL command not properly ended 原因排查
Oracle查询提示 ORA-00933 SQL command not properly ended 原因排查
2022-08-02 10:15:00 【免费的东西】
Oracle查询提示 ORA-00933: SQL command not properly ended 原因排查
问题描述
一段sql语句,在postgre数据库中运行未出现问题,切换到oracle数据库后报错。SQL语句如下
select T.code as CODE
from info_table as T
在oralcle执行后报如下错误
> ORA-00933: SQL command not properly ended
问题排查与解决
在网上查询了该报错之后看到了如下信息
出现这个错误的情况还是挺多的,当抛出此错误提示信息,代表着SQL语句本身就是有问题的!(ORA-00933:SQL命令没有正确的结束)比如:
1:可能SQL语句中关键字前后缺少空格
2:Oracle 给表起别名时,直接在表名的后面空格别名就可以,不需要AS
3:SQL 语句中缺少关键字或者多了某个关键字,比如:AND
4:SQL 语句中缺少关键字或者多了某个标点符号,比如:,
5:数据库不同的版本或不同的数据库支持的SQL的语法规则是不一样的,一句SQL语句在一个数据中是正确的在另一个数据库中未必也正确
我的语句中正好存在表别名,且加了as关键字。去掉as改成如下语句,顺利解决问题
select T.code as CODE
from info_table T
相关链接: ORA-00933: SQL command not properly ended.
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。添加下方名片,即可获取全套学习资料哦
边栏推荐
- LayaBox---TypeScript---Symbols
- LayaBox---TypeScript---模块解析
- 使用较广泛的安全测试工具有哪些?
- The R language uses the rollapply function in the zoo package to apply the specified function to the time series in a rolling manner and the window moves, and set the align parameter to specify that t
- LayaBox---TypeScript---迭代器和生成器
- 软件测试H模型
- LayaBox---TypeScript---模块
- R language ggplot2 visualization: use the ggtexttable function of the ggpubr package to visualize tabular data (directly draw tabular graphs or add tabular data to images), use tbody_add_border to add
- 重磅大咖来袭!阿里云生命科学与智能计算峰会精彩内容剧透
- 利用二维数据学习纹理三维网格生成(CVPR 2020)
猜你喜欢
随机推荐
R语言ggplot2可视化:使用ggpubr包的ggtexttable函数可视化表格数据(直接绘制表格图或者在图像中添加表格数据)、使用tbody_add_border为表格中的表头添加外侧框线
行为型模式-策略模式
3 d laser slam: LeGO - LOAM - ground point extracting method and the analysis of the code
3年测试在职,月薪还不足2w,最近被裁员,用亲身经历给大家提个醒...
wireshark的安装教程(暖气片安装方法图解)
你认同这个观点吗?大多数企业的数字化都只是为了缓解焦虑
读博一年后对机器学习工程的思考
The R language uses the ggtexttable function of the ggpubr package to visualize the table data (draw the table directly or add the table data to the image), set the theme parameter to customize the fi
只问耕耘,不问收获,其实收获却在耕耘中
The R language uses the rollapply function in the zoo package to apply the specified function to the time series in a rolling manner and the window moves, and set the align parameter to specify that t
QT专题:事件机制event基础篇
The realization of the list
LayaBox---TypeScript---Namespaces and modules
R语言时间序列数据的平滑:使用KernSmooth包的dpill函数和locpoly函数对时间序列数据进行平滑以消除噪声
Com多进程通信实现
Use compilation to realize special effects of love
练习16-两道模拟题
斯皮尔曼相关系数
DirectX修复工具增强版「建议收藏」
armv7与armv8的区别(v8和w12的区别)









