首页 > 解决方案 > 如何在不使用create的情况下将sql server中表的内容移动到另一个表

问题描述

I'm trying to move a table in sql server to another table without the use of create. Is there any way to accomplish this.

我正在尝试使用select * from table

标签: sql-server

解决方案


您可以使用SELECT . . INTO

SELECT s.* 
INTO <destination>
FROM <source> s;

这将创建<DESTINATION>具有自动填充数据的表。

注意:这将复制表定义仅包括(列/数据类型)。


推荐阅读