All for Joomla All for Webmasters

SQL COPY TABLE

If you want to copy a SQL table into another table in the same SQL server database, it is possible by using the select statement.

The syntax of copying table from one to another is given below:

  1. Select * into <destination tablefrom <source table>

For example, you can write following command to copy the records of hr_employee table into employee table.

  1. Select * into admin_employee from hr_employee;

Note: SELECT INTO is totally different from INSERT INTO statement.

PinIt
submit to reddit

Leave a Reply

Top