sql server - A simple help needed about creating table -


i totally new in sql , sql server without prior knowledge. try learn sql server love of it. question simple. having problem creating table using sql code. want create table named new_table table old_table. code is:

create table new_table (select * old_table)  

but giving following error: msg 102, level 15, state 1, line 2 incorrect syntax near '('.

i have done many things not figure out problem. can 1 please guide me problem?

select * new_table  sourcetable  

new_table must not exist.

ref.

in response comment:

select * dbo.new_table  (select distinct col1 old_table) tmptable 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -