云数据库 GAUSSDB-PREPARE:示例

时间:2024-11-02 18:50:24

示例

char *stmt = "SELECT * FROM test1 WHERE a = ? AND b = ?";
EXEC SQL ALLOCATE DESCRIPTOR outdesc;
EXEC SQL PREPARE foo FROM :stmt;
EXEC SQL EXECUTE foo USING SQL DESCRIPTOR indesc INTO SQL DESCRIPTOR outdesc;
support.huaweicloud.com/centralized-devg-v3-gaussdb/gaussdb-12-0216.html