Oracle column Alias - from keyword not found where

2019-04-19 15:50发布

SELECT col1 'COLUMN 1'
FROM TABLENAME

I am getting an error 'from keyword not found where expected'

How can you give column alias in Oracle 10g some examples are appreciated

标签: oracle10g
3条回答
时光不老,我们不散
2楼-- · 2019-04-19 16:11

Use double quotes:

SELECT col1 "COLUMN 1" FROM TABLENAME
查看更多
神经病院院长
3楼-- · 2019-04-19 16:12

Single quotes is not allowed here .Either you have to use double quotes or not quots between column1.Careful about column1 because it doesn't supported any spaces between column1.

查看更多
够拽才男人
4楼-- · 2019-04-19 16:20

Shepherdess is correct - you can't use single quotes here.

If the alias doesn't have spaces, you could just type the name without any quotes:

SELECT col1 column1 FROM TABLENAME
查看更多
登录 后发表回答