Run mysqldump to get the CREATE TABLE statement that contains the column definition : mysqldump « Command MySQL « SQL / MySQL






Run mysqldump to get the CREATE TABLE statement that contains the column definition

       

% mysqldump --no-data myDatabase mytbl > test.txt

   
    
    
    
    
    
    
  








Related examples in the same category

1.Backing Up All Databases
2.In migrating with mysqldump/mysql
3.Common Options of the MySQL Server (mysqld) and the MySQL Client Tools(mysql, mysqladmin, mysqldump, mysqlimport, etc.)
4.mysqldump creates datafiles in tab-delimited, linefeed-terminated format by default.
5.Issue a mysqldump command
6.mysqldump command backs up the Authors and Books table in the BooksDB database:
7.mysqldump command backs up the BooksDB and BooksDB2 databases
8.Make a backup of the duckwear database using the following mysqldump command
9.mysqldump interprets its first nonoption argument as a database name and dumps all the tables in that database.
10.Name just the City and Country tables after the database name, so mysqldump dumps just those tables
11.With the --databases option, mysqldump interprets any nonoption argument as a database name and dumps all the tables in each of the named databases.
12.With the --all-databases option, mysqldump dumps all tables in all databases.
13.To reload an SQL-format dump file produced by mysqldump, process it with mysql.
14.mysql can read from a pipe, so you can combine the use of mysqldump and mysql into a single command.
15.To dump multiple tables, name them all following the database name argument.
16.Copying Tables or Databases to Another Server
17.To flush the logs when creating a backup file
18.To dump the contents of the world database to an output file named world.sql
19.Use a pipe to copy the Country table from the world database on the local host to the world database on the remote host other.host.com:
20.Backup of InnoDB databases:With InnoDB tables, LOCK commands solve nothing.
21.Making a Backup of an Entire Database
22.backs up all your databases to a file named databackup_041031.sql
23.Backup and Restoration of stored procedures
24.To dump a table as a datafile, you must specify a --tab option that indicates the directory where you want the MySQL server to write the file.
25.Exporting Table Contents or Definitions in SQL Format