Thursday, January 22, 2009

Get Create Table statement from MySQL

$ sql "show create table my_table\G" | sed -e '1,2d;s/Create Table: //'
Note: sed -e '1,2d' removes the first 2 lines.

No comments: