gpt4 book ai didi

mysql - 如何在mysql中使用PLSQL以动态值插入批量数据

转载 作者:行者123 更新时间:2023-11-30 00:07:56 26 4
gpt4 key购买 nike

我需要将动态值插入到表中,并向其子表中插入一些数据。表还包含一些独特的字段。对于唯一字段,它应该插入为 temp1、temp2、temp3....,如果有人展示一个示例代码来动态插入 100 条记录到父表及其子表,我将不胜感激,因为我是 PLSQL 的新手。

最佳答案

您不能执行此操作,因为 MySQL 不支持 PLSQL。 language for Oracle database handling .

PL/SQL is a procedural language designed specifically to embrace SQL statements within its syntax. PL/SQL program units are compiled by the Oracle Database server and are stored inside the database. And at run-time, both PL/SQL and SQL run within the same server process, bringing optimal efficiency. PL/SQL automatically inherits the robustness, security, and portability of the Oracle Database.

您可以使用 , 或任何其他编程语言来进行插入。

关于mysql - 如何在mysql中使用PLSQL以动态值插入批量数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24358722/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com