动态生成SQL执行语句

SET @qry = 'SELECT product_cd, name, product_type_cd, date_offered, date_retired
FROM product
WHERE product_cd = ?';
PREPARE dynsql2 FROM @qry;
SET @prodcd = 'CHK';
EXECUTE dynsql2 USING @prodcd;
SET @prodcd = 'SAV';
EXECUTE dynsql2 USING @prodcd;
DEALLOCATE PREPARE dynsql2;

动态生成SQL执行语句

上一篇:JAVA中如何正确的用String转Date


下一篇:Java编程思想学习(六) 多态