Generate script in SQL Server Management Studio

前端 未结 3 1494
轮回少年
轮回少年 2020-11-28 09:26

If I have a table with data in a database in SQL Server, how can I generate a script that will create the table and add the data too?

If I right click on the table

相关标签:
3条回答
  • 2020-11-28 09:42

    Use SSMS scripting feature (Rightclick on database->Tasks->Generate Scripts)

    or

    use SSMS Tools Pack

    0 讨论(0)
  • 2020-11-28 09:43

    Here what you have to do:

    1. right click the database (not the table) and select tasks --> generate scripts
    2. Next --> select the requested table/tables (from select specific database objects)
    3. next --> click advanced --> types of data to script = schema and data
    4. next and finish
    0 讨论(0)
  • 2020-11-28 09:58

    Here You can see step by step process of Generate script in SQL Server Management Studio :

    Step 1: Right Click on Your Database --> Select Task-->Generate Script..

    Step 2: Select Next in Script Wizard

    Step 3: Select Script Entire Database

    Step 4:Choose Your File Name

    and Finish

    Now you can use your script file.

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