简体   繁体   中英

Is there any way to generate database scripts from a SQL query in SQL Server?

I need to dump the database structure for a SQL Server database, but I need to do it from a SQL query or sqlcmd script.

Is there a valid way to do it?

Thanks

打开对象资源管理器,右键单击数据库,任务,生成脚本,然后编写整个数据库和所有数据库对象,保存到文件,下一步,下一步,完成。

Follow the complete steps to generate script with data.

1 在此输入图像描述

2 在此输入图像描述

3

在此输入图像描述

4

在此输入图像描述

5

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM