如何使用触发器复制SQL Server表?

时间:2016-12-02 04:10:51

标签: sql sql-server-2008-r2

我想复制SQL Server 2008 R2数据库表A1以创建克隆表A1Clone(空表)。有没有办法一次性完成这项操作?感谢。

编辑:

我尝试了SSMS,数据库级别Generate Scripts,并且我能够使用高级选项生成脚本,以使脚本能够创建触发器和索引。

Advanced scripting options

想知道是否还有其他快捷方式可以复制整个表格对象。

1 个答案:

答案 0 :(得分:1)

If you are asking ,how to copy table related objects like indexes,triggers in one go..you can't do that by normal ways like select into...Your options

  1. generate scripts of existing object,on which you want to perform operation..
  2. normal way of creating entirely
相关问题