我正在尝试复制 SQL Server 中的表:
select *
into student_info
from student_constraint
where 1 = 2;
Run Code Online (Sandbox Code Playgroud)
但它只是复制架构。
如何复制带有约束和关键信息的表?
当我搜索它时,我得到了一些答案。但是当我使用这个解决方案时 - (附有屏幕截图)。
我收到错误
消息 156,级别 15,状态 1,第 38
行关键字“like”附近的语法不正确
我有一个表student_constraint,我想创建一个新表,例如student_constraint.
create table student_info like student_constraint
Run Code Online (Sandbox Code Playgroud)
您能解释一下这个概念吗?
谢谢你!