简体   繁体   English

MySQL查询恢复

[英]MySQL query recovery

I created a database for my class and inserted all of my data into the tables but I did not save the queries I used to create them. 我为我的班级创建了一个数据库,并将所有数据插入表中,但是没有保存用于创建它们的查询。 Is there any way that I can get back the queries I originally used to input all of the data so that I can save them to a separate query tab? 有什么方法可以找回我最初用于输入所有数据的查询,以便可以将它们保存到单独的查询选项卡中?

For the tables issue the SHOW CREATE TABLE <table name>; 对于表,发出SHOW CREATE TABLE <table name>; command. 命令。 For the data you can use a tool like phpMyAdmin or HeidiSQL (Windows) to create an export of the table contents. 对于数据,可以使用phpMyAdmin或HeidiSQL(Windows)之类的工具来创建表内容的导出。

您可能可以执行mysqldump --no-data dbname

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM