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 方言和兼容性

 

存储过程的自动转换

除了支持 Transact-SQL 替代语法之外,SQL Anywhere 还提供了用于在 Watcom SQL 方言和 Transact-SQL 方言之间进行转换的辅助工具。返回有关 SQL 语句的信息并可实现 SQL 语句自动转换的 SQL 语言内置函数包括:

  • SQLDialect(statement)   返回 Watcom-SQL 或 Transact-SQL。

  • Watcom SQL(statement)   返回语句的 Watcom-SQL 语法。

  • TransactSQL(statement)   返回语句的 Transact-SQL 语法。

它们是函数,因此可以使用 Interactive SQL 中的 SELECT 语句来访问它们。例如,以下语句返回值 Watcom-SQL:

SELECT SQLDialect( 'SELECT * FROM Employees' );

使用 Sybase Central 转换存储过程