Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不小心DROP从数据库中的表中获取了一列。我想恢复该列,幸运的是我今天早上有一个备份的 .sql 文件。我使用 DataGrip。
DROP
有没有办法从 .sql 文件中只导入该表?这样我就不必重置所有其他表(其他人正在处理)。
我最终做的是
mysqladmin -u root -p create temp
mysql -u root -p restore < mydump.sql
mysqldump -u root -p restore mytable > mytable.sql
在 DataGrip 中导入文件,右键单击选项卡并按“运行...”并将您的数据库设置为目标。