[英]copy result of a stored procedure into an existing table using phpMyAdmin
I have the following stored procedure in phpMyAdmin:我在 phpMyAdmin 中有以下存储过程:
I need to save the result into the following existing table:我需要将结果保存到以下现有表中:
but I don't know how to code this.但我不知道如何编码。 The code should clear/update(?) the table every-time the stored procedure is executed and populate the last field "profile_completion_percentage" with the sum of the previous fields (excluded the id).
代码应该在每次执行存储过程时清除/更新(?)表,并用前一个字段的总和(不包括 id)填充最后一个字段“profile_completion_percentage”。 Can you please help?
你能帮忙吗?
use用
INSERT ... SELECT Statement
INSERT ... SELECT 语句
https://dev.mysql.com/doc/refman/8.0/en/insert-select.html https://dev.mysql.com/doc/refman/8.0/en/insert-select.html
So you can add your result very simple to your table因此,您可以非常简单地将结果添加到表格中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.