有没有办法从 SQL Server 中的 SQL 查询生成数据库脚本? [英] Is there any way to generate database scripts from a SQL query in SQL Server?

查看:23
本文介绍了有没有办法从 SQL Server 中的 SQL 查询生成数据库脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要转储 SQL Server 数据库的数据库结构,但我需要从 SQL 查询或 sqlcmd 脚本中完成.

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?

谢谢

推荐答案

按照完整的步骤生成带有数据的脚本.

Follow the complete steps to generate script with data.

1

2

3

4

5

这篇关于有没有办法从 SQL Server 中的 SQL 查询生成数据库脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆