Tuesday, October 19, 2010

You want to Copy Only Schema of one table into another new table. How will you do that ?

Ans :

select * into new_tablename from original_tableName where 1=2

Just for reference:
To make a copy of a table : "select * into"


select * into new_tablename from original_tableName -- this will copy full table with data

No comments:

Post a Comment

 using Microsoft.AspNetCore.Mvc; using System.Xml.Linq; using System.Xml.XPath; //<table class="common-table medium js-table js-stre...