×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: SQL
Posted by: userc865b
Added: Aug 30, 2017 2:59 PM
Views: 1
Tags: mysql
exceute String but not allowed in stored functions or triggers only in stored procedures
  1. CREATE PROCEDURE `EVAL` (IN `sql_code` text)
  2. MODIFIES SQL DATA
  3.     COMMENT 'evaluates given string as SQL code'
  4. BEGIN
  5.     SET @sql_code = sql_code;
  6.     PREPARE stmt FROM @sql_code;
  7.     EXECUTE stmt;
  8. END