What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 3388 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > SQL Server Interview Questions > Which command is used to create a table ...

Which command is used to create a table by copying the structure of another table?

Interview question and answer by: Abhisek | Posted on: 1/21/2010 | Category: SQL Server Interview questions | Views: 1327 |


Answer:

CREATE TABLE .. AS SELECT command
Example:-
CREATE TABLE AS SELECT*FROM WHERE 1=2;

Asked In: Many Interviews | Alert Moderator 
Found interesting? Add this to:


 Responses

Posted by: Easwaran | Posted on: 31 Aug 2012 07:18:11 AM | Points: 10 | Alert Moderator 

Please give working code snippet. The above given code is not working. I tried with code CREATE TABLE TestTable AS SELECT*FROM age_unit_type WHERE 1=2;

>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from Abhisek

Even more ... | Submit Interview Questions and win prizes!


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 6:54:13 AM