如何在表中没有数据的情况下备份数据库

如何在表中没有数据的情况下备份数据库

问题描述:

我有一个数据库,其中有50个表...我需要在表中没有数据的情况下备份数据库

I have a database in that 50 tables are there... I need to backup the database without datas in table

在SSMS中,转到您的数据库并鼠标右键->任务->生成脚本

向导打开.接下来,选择所有要编写脚本的对象.默认情况下,它将仅对架构进行脚本编写.您可以将其转储到文件或新的查询窗口等

您实际上可以根据需要选择在此处编写数据脚本,这是一个有用的功能:)
In SSMS, goto your database and right mouse -> Tasks -> Generate Scripts

wizard opens. Next through, choose all the objects you want to script. By default, it will only script the schema. You can dump it to a file, or new query window etc

You can actually choose to script data here if you like, it''s a useful feature :)