何时使用“=”与 "as" 引入别名以及该版本的名称是什么
When was aliasing using "=" versus "as" introduced and what is the name of that version
什么时候 sql 的 flavor 名称支持“=”作为别名而不是使用“as”?
SELECT
A = Col1
,B = Col2
FROM Table
相对于SQL-86
SELECT
Col1 AS A
, Col2 AS B
FROM Table
这让我感到非常惊讶。 column_alias = 表达式似乎一直是 T-SQL.
原始语法的一部分
已将 AS 命令添加到 T-SQL.80 (2000) 以与 SQL-92 兼容。
SQL2000_release.pdf 第 1459 页的摘录
The AS clause is the syntax defined in the SQL-92 standard for assigning a name to a result set column. This is the preferred
syntax to use in Microsoft® SQL Server™.
column_name AS column_alias
Or
result_column_expression AS derived_column_name
Transact-SQL also supports the following syntax for compatibility with earlier versions of SQL Server:
column_alias = column_name
什么时候 sql 的 flavor 名称支持“=”作为别名而不是使用“as”?
SELECT
A = Col1
,B = Col2
FROM Table
相对于SQL-86
SELECT
Col1 AS A
, Col2 AS B
FROM Table
这让我感到非常惊讶。 column_alias = 表达式似乎一直是 T-SQL.
原始语法的一部分已将 AS 命令添加到 T-SQL.80 (2000) 以与 SQL-92 兼容。
SQL2000_release.pdf 第 1459 页的摘录
The AS clause is the syntax defined in the SQL-92 standard for assigning a name to a result set column. This is the preferred
syntax to use in Microsoft® SQL Server™.
column_name AS column_alias
Or
result_column_expression AS derived_column_name
Transact-SQL also supports the following syntax for compatibility with earlier versions of SQL Server:
column_alias = column_name