Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere 服务器 - SQL 的用法 » SQL 方言和兼容性 » 兼容的 SQL 语句

 

与 Transact-SQL 兼容的查询

若要编写在 SQL Anywhere 数据库和 Adaptive Server Enterprise 数据库上都能运行的查询,应遵循下面两条标准:

  • 查询中的数据类型、表达式和搜索条件必须兼容。

  • 语句本身的语法必须兼容。

本节假定数据类型、表达式和搜索条件都相互兼容。以下示例假设 quoted_identifier 选线设置为 OFF,这是 Adaptive Server Enterprise 的缺省设置,但不是 SQL Anywhere 的缺省设置。

SQL Anywhere 的 Transact-SQL 方言实现支持 Watcom SQL 方言中的大多数查询表达式语法,尽管 Adaptive Server Enterprise 并不支持某些 SQL 结构。在 Transact-SQL 查询中,SQL Anywhere 支持以下 SQL 结构:

下面总结了 SQL Anywhere 的 Transact-SQL 方言支持的语法:

 语法
 参数
 注意
 另请参见