Home > SQL > Creating a table by coping old table structure copy in SQL 2005

Creating a table by coping old table structure copy in SQL 2005

E.g 1

SELECT * INTO NewTblName FROM ExistingTblName WHERE 1 = 0

E.g 2

SELECT * INTO NewTblName FROM

(SELECT PKId, PKStatusId, P.CreatedDate, P.LastModifiedDate, PayOptId, AccountNo, RoutingNo, Pin, DedOfferAmount,  IntTrackNo, Lang, RequestUrl, PCode, PromoCodeAmount, S.[SId], FirstName, LastName, Address1, Address2, Address3, City, [State], ZipCode, Country, Phone, Email, [Password]  FROM Sel S, Pro P WHERE 1 = 0 ) AB

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Trackbacks:0

Listed below are links to weblogs that reference
Creating a table by coping old table structure copy in SQL 2005 from extremeweblog.com
TOP