Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

sql - 如何从SQL Server 2008中的选择查询结果创建表[重复](How to create a table from select query result in SQL Server 2008 [duplicate])

This question already has an answer here:

(这个问题在这里已有答案:)

I want to create a table from select query result in SQL Server, I tried

(我想在SQL Server中从select查询结果创建一个表,我试过了)

create table temp AS select.....

but I got an error

(但是我收到了一个错误)

Incorrect syntax near the keyword 'AS'

(关键字“AS”附近的语法不正确)

  ask by yogesh9239 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

使用以下语法从SQL Server 2008中的旧表创建新表

Select * into new_table  from  old_table 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...