云数据库 GAUSSDB-PREPARE:示例

时间:2024-11-13 14:45:34

示例

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-v8-gaussdb/gaussdb-42-0232.html