在 Oracle “AS"中别名不起作用 [英] In Oracle "AS" alias not working

查看:40
本文介绍了在 Oracle “AS"中别名不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道为什么 Oracle 不允许在查询中使用AS"别名.在我的项目中,我返回的所有查询都有别名关键字AS".

Just want to know why Oracle not allowed "AS" alias in Query. In My project all queries which i returned have alias keyword "AS".

例如;

Select t1.id,t2.name from Table1 As t1 ,Table2 t2 
on
  t1.id =t2.id

上述查询在所有服务器(如 PostgreSQL、Microsoft SQL 服务器)中运行,但在 Oracle 中不工作由于别名As"而显示错误命令不存在".如果我删除它就会运行.

above Query run in all Server like PostgreSQL ,Microsoft SQL server but in Oracle its Not working showing error "Command does not exists" because of alias "As". If i remove then it will run.

只是想知道为什么 Oracle Server 会这样?我想使用AS"别名运行查询.

just want to know why Oracle Server behave like this ? i want to run query using "AS"alias name.

推荐答案

虽然 Oracle 允许您在定义列别名时使用 AS,但它不允许您使用 AScode> 定义表别名时.这就是 Oracle 的工作方式.

While Oracle allows you to use AS when defining column aliases, it doesn't allow you to use AS when defining table aliases. It's just how Oracle works.

这篇关于在 Oracle “AS"中别名不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆