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

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 编程 » SQL Anywhere 数据访问 API » SQL Anywhere for Ruby » SQL Anywhere Ruby API

 

sqlany_execute_immediate

立即执行指定的 SQL 语句,不返回结果集。这对不返回结果集的语句很有用。

语法
sqlany_execute_immediate ( $conn, $sql )
参数
  • $conn   已使用 sqlany_connect 建立连接的连接对象。

  • $sql   SQL 字符串。SQL 字符串不应包含诸如 ? 之类的参数。

返回值

返回标量值,成功时为 1,不成功时为 0。

另请参见
示例
rc = api.sqlany_execute_immediate(conn, "UPDATE Contacts
     SET Contacts.ID = Contacts.ID + 1000
     WHERE Contacts.ID >= 50" )