数据仓库服务 GAUSSDB(DWS)-EXECUTE:示例

时间:2024-12-24 10:32:42

示例

为一个INSERT语句创建一个预备语句,然后执行它:
1
2
3
CREATE TABLE IF NOT EXISTS reason_t1 (a int,b varchar(20),c varchar(20));
PREPARE insert_reason(integer,character(16),character(100)) AS INSERT INTO reason_t1 VALUES($1,$2,$3);
EXECUTE insert_reason(52, 'AAAAAAAADDAAAAAA', 'reason 52'); 
support.huaweicloud.com/sqlreference-dws/dws_06_0248.html