0

This is MySQL procedure. How can I receive the output into the variable?

this is an analyze statements in a loop. this return many results to the code and I would like to save those results in the log table.

result example : alonpdb.XXX analyze status OK

SET @analyze_stmt = CONCAT('ANALYZE TABLE ', @v_table_name);
PREPARE stmt FROM @analyze_stmt;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
2
  • Are you looking for this Commented Jan 2, 2019 at 11:26
  • I'm not sure you can do this in mysql alone. Analyze table is a utility statement, not a select, and mysql handles these resultsets differently. You may have to use an external programming language for this. Commented Jan 2, 2019 at 11:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.