这里是 N'some string' ANSI SQL 吗?

Is N'some string here' ANSI SQL?

我们知道,为了将字符串文字限定为 Unicode,我们需要在 Transact-SQL 中为其添加前缀 N。我的问题是这是否是任何标准的一部分,例如 ANSI SQL。其他数据库平台会理解这个吗?

更新:

我对 Mig# 的实际实验表明,为了使用 Unicode 文字:

根据 the MSDN documentation for constants in T-SQLN' 前缀是 "SQL-92" 标准的一部分:

Unicode strings have a format similar to character strings but are preceded by an N identifier (N stands for National Language in the SQL-92 standard).

根据Wikipedia, "National Character" strings were added in that version of the standard. That article references what appears to be the actual standard document http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt 其中说:

The <key word>s NATIONAL CHARACTER are used to specify a character string data type with a particular implementation-defined character repertoire. Special syntax (N'string') is provided for representing literals in that character repertoire.

所以,是的,看来它绝对是标准的一部分。

更新:

正如 Damien_The_Unbeliever 在这里的评论中指出的那样,上面链接的标准文件实际上是一个 草案 (并且据推测实际的标准文件是不公开的) ,但在我看来,似乎有足够的证据表明,至少就国民性而言N,这是标准。

在第

节下

4.2 Character Strings

属于 SQL92 规范(http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

The s NATIONAL CHARACTER are used to specify a character string data type with a particular implementation-defined character repertoire. Special syntax (N'string') is provided for representing literals in that character repertoire.

是的,根据最广泛使用的规范,它是标准 ANSI