我有一个名为Table1
的表
Column Name Data type Max length Precision Scale is_nullable Primary Key Price float 8 53 0 1 0 Name varchar 180 0 0 1 0 Id_no int 4 10 0 1 1 DOB date 3 10 0 1 0
我需要创建另一个名为 Table2
的表,其中表 1 的列名称行(以及数据类型、最大长度等属性)应该是另一个表的我的列,喜欢
Table 2 Price Name Id_No DOB
(请注意,创建表查询还应该考虑属性)
最佳答案
您可以使用 select into
创建表的副本:
select *
into NewTable
from OldTable
关于sql - 从另一个表的行及其属性创建表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14502100/