Creating a Table Problem

At the beginning of each month I need to create a new table for the previous months data.

The table has the same column headings as another table in the database.

I have been given the code below for the data part

SELECT distinct *
FROM table
Where etc

What is the SQL for creating the table and how do I use the code above to populate it?

Thanks
Mark WilsonBI DeveloperAsked:
Who is Participating?
 
TheSloathCommented:
SELECT distinct * INTO tblNewTable
FROM table
Where etc
0
 
mnrzCommented:
if you are using Oracle:

create table new_table as
SELECT distinct *
FROM table
Where etc
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.