• Here is way to copy data between tables with the same structure/layout:

Trucate table destination_tablename

Insert Into destination_tablename
Select *  from source_tablename

  • T-SQL to count columns in a table:

SELECT count(column_name) from Information_schema.columns where table_name = 'Table_Name'