如果希望在别名中使用空格,并要保留空格,就必须使用双引号将别名正文引起来。
在别名之前,也可以使用可选的关键字AS
select price as price from emp:
select price as "price" from emp:
select price "price on emp " from emp;
select price as "price on emp" frmo emp;
在别名之前,也可以使用可选的关键字AS
select price as price from emp:
select price as "price" from emp:
select price "price on emp " from emp;
select price as "price on emp" frmo emp;
本文介绍了在SQL查询中如何正确地使用带有空格的别名。为了在别名中保留空格,需要使用双引号将别名括起来。文章通过示例说明了这一用法。
995

被折叠的 条评论
为什么被折叠?



