云数据库 GAUSSDB-PREPARE:示例

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

示例

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/distributed-devg-v8-gaussdb/gaussdb-12-0190.html