How to create table using a subquery in SQL Server

0 pts.
Tags:
SQL
SQL Server
Hi everybody, Everyone knows that a table can be created using a subquery in oracle. How to do the same task in SQL Server. In Oracle I tried as "create table table1 as select * from table2" My requirement is to create dynamic tables in stored procedure based on existing tables. I'm so desperate, I need help from IT kings like you.
ASKED: February 8, 2006  5:53 AM
UPDATED: October 22, 2013  3:13 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Select * into new_table from old_table;

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • JAHANARADHA73
    Create a table dept taking its defination from departments table without taking data from departments table
    20 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following