Note: In a production environment, you need to have dirty data in the database, clear the table data, and preserve the data structure.
Steps:
With tools SQLyog
I. Export the database structure
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/86/60/wKiom1e9SnXxF-DAAABP-h5Lwzo964.png "title=" go. png " alt= "Wkiom1e9snxxf-daaabp-h5lwzo964.png"/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/86/60/wKioL1e9SsOxywtkAACQmk9jI9Q253.png "title=" gd.png "alt=" Wkiol1e9ssoxywtkaacqmk9ji9q253.png "/>
Export Test.sql
Second, enter the database to execute drop
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/86/60/wKioL1e9S8LCRRdQAAAxqhpm3-c372.png-wh_500x0-wm_3 -wmp_4-s_2399314617.png "title=" Ff.png "alt=" Wkiol1e9s8lcrrdqaaaxqhpm3-c372.png-wh_50 "/>
Third, import table structure
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/86/60/wKioL1e9TBKzmj43AABZiIQtk2k320.png "title=" place. png "alt=" Wkiol1e9tbkzmj43aabziiqtk2k320.png "/>
Results show: The table data was emptied, but the table structure did not change.
This article is from the "7835882" blog, please be sure to keep this source http://crfsz.blog.51cto.com/7835882/1842017
MySQL Clears table data