gpt4 book ai didi

java - Mysql建表sql多个

转载 作者:行者123 更新时间:2023-11-29 23:30:34 24 4
gpt4 key购买 nike

是否有可能得到类似的输出

dbName  tableName  createSql
test t1 create table t1 ( id int not null )
test t2 create table t2 ( id int not null )
prod t9 create table t9 ( id int not null )

在mysql中使用简单的sql查询。

最佳答案

您可以尝试从 information_schema 重新创建创建语句(噩梦,但可能有人已经做到了);您可以简单地循环所有表格,执行显示创建,然后相应地对其进行总结;或者你可以写一个 SP 来做到这一点。另一种选择是 mysqldump -d。

关于java - Mysql建表sql多个,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26608044/

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