Copying a Table : Copy Table : Table Index SQL / MySQL


SQL / MySQL » Table Index » Copy Table »

 

Copying a Table



/*create a copy of a table so that you
can alter it or experiment with it without endangering the original
data
*/

CREATE TABLE new_table_name
SELECT FROM old_table_name;

/* Differences: their names, 
               if the old table had an index (or key), it
does not transfer to the new table. 
only two columns chosen
*/
           
       



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

SQL / MySQL

 Navioo Table Index
» Copy Table