backup a table in sql 1

backup a table in sql

CREATE TABLE backup_table SELECT * FROM table_to_be_backed_up;

Here is what the above code is Doing:
1. Create a new table called backup_table
2. Select all the columns and rows from the table_to_be_backed_up table
3. Insert them into the backup_table

Similar Posts