首页 > 编程知识 正文

oracle建表标识符无效(oracle表别名标识符无效,sql – 由于列别名导致oracle中的标识符无效错误)

时间:2023-05-06 17:10:42 阅读:122139 作者:4222

这些查询包括

选择t.col 1,

t.col2、

(选择计数(col1) )

from tab

where col1=t.col1

and col2=t.col2

) as col3

from tab t

where col3 1

此查询发出了“col3无效标识符”错误。

我尝试了各种变体来定义下面列出的别名和使用它们时出现的错误

选择t.col 1,

t.col2、

(选择计数(col1) )

from tab

where col1=t.col1

and col2=t.col2

) as 'col3'

from tab t

where col3 1

错误: col3无效的标识符

选择t.col 1,

t.col2、

(选择计数(col1) )

from tab

where col1=t.col1

and col2=t.col2

) as 'col3'

from tab t

where [col3] 1

错误:公式在哪里丢失的

选择t.col 1,

t.col2、

(选择计数(col1) )

from tab

where col1=t.col1

and col2=t.col2

(col3) )。

from tab t

where [col3] 1

错误:公式在哪里丢失的

请说明我的错误是什么

附件:我不知道为什么不能在这里将查询示例标记为代码。 我为这些查询的可读性差而道歉

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。