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

前端 未结 2 1873
花落未央
花落未央 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:51

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

提交回复
热议问题