Execute a string Query in mysql.
Example Procedure.
CREATE PROCEDURE SpRetrive($Squery nvarchar(16000))
BEGIN
SET @stmt_str = $Squery;
PREPARE stmt FROM @stmt_str;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END
Execute procedure.
CALL SpRetrive('select * from state')
Result:
0 Comments