export structure of table mysql code example
Example 1: get only structure database mysql
mysqldump -u root -p --no-data dbname > schema.sql
Example 2: export mysql table to file
mysqldump db_name tbl_name;
mysqldump -u root -p --no-data dbname > schema.sql
mysqldump db_name tbl_name;