绑定变量的有效运用能显著提升ORACLE_SQL的性能表现。未使用绑定变量的典型语句如:sprintf(sqlstr, \"insert into scott.test1 (num1, num2) values (%d,%d)\",n_var1, n_var2); EXEC SQL EXECUTE IMMEDIATE :sqlstr ; EXEC SQL COMMIT; 而改用绑定变量的语句如:strcpy(sqlstr, \"insert into test (num1, num2) values (:v1, :v2)\"); EXEC SQL PREPARE sql_stmt FROM :sqlstr; EXEC SQL EXECUTE sql_stmt USING :n_var1, :n_var2; EXEC SQL COMMIT;