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

前端 未结 2 1870
花落未央
花落未央 2021-01-20 14:58

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?

相关标签:
2条回答
  • 2021-01-20 15:50

    Follow the complete steps to generate script with data.

    1

    2

    3

    4

    5

    0 讨论(0)
  • 2021-01-20 15:51

    Open object explorer, right click db, tasks, generate scripts, next, script entire databse and all database objects, save to file, next, next, finish.

    0 讨论(0)
提交回复
热议问题