简体   繁体   English

在SQL Server 2005中创建新表

[英]In creating a new table in SQL Server 2005

I have a table Company . 我有一个餐桌Company Now I need to copy the contents of table Company in a new table Employee (that too while creating the Employee table). 现在,我需要在新表Employee复制表Company的内容(在创建Employee表时也是如此)。 I just used the query shown below, but its showing an ERROR. 我只使用了下面显示的查询,但是它显示了错误。

 Create Table Employee as (Select * from Company)

Is there any other solution for this....? 还有其他解决方案吗...?

只需使用INTO

Select * into Employee from Company

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM