copy of table employee to new table Emp_Backup without data

Posted by Bandi under Sql Server category on | Points: 40 | Views : 345
As per my real-time experience, sometimes i might have needed to create the table structure same as other table. Mainly, i need only the same table structure with all columns and with NO data . In these cases the simple and better query do the work....

INTO Emp_Backup
FROM EmployeeTable

INTO Emp_Backup --> This part is to create new table named as 'Emp_Backup' with same structure of EmployeeTable
WHERE 1=2 --> this part is not to copy the data

Comments or Responses

Login to post response