you need to do it in two steps - first create the structure, then insert the content
Or, if we are talking about mySQL, just use phpMyAdmin - it does it with one funktion.
You have the choice copying to another database, or dump it to a sql-file - and read the sql-file into the target database