phpmyadmin does it, so get you'reself phpmyadmin, find out wich file exactly does the trick (wich is tbl_move_copy.php) and look in that file how phpmyadmin does it.
Then simply do the same or think of something better
You could also copy the table with the records.
then delete everything from that table, and you got you'reself a empty new table. You don't want to do that with large tables though, may take a LOT of time