SQL Server 2012 Management Studio - scripts

I installed Microsoft SQL Server Management Studio 11.0.3128 and you need to use the "script as" table to generate a drop and create a script for my tables. I have 107 tables in my database.

If I select all my tables, the generated generated foreign key script will be omitted and the pk and fk create scripts will be omitted. The exception of one of the tables (any) gives the expected result, including the fk and pk scripts in the generated SQL.

Thank.

+4
source share
1 answer

1) Select a database

enter image description here

2) Right-click, select "Task" → "Generate Scripts"

enter image description here

3) "" > , , , SProc,

enter image description here

4) → , " -" " ". ""

enter image description here

5) , . " /" "" "", .

enter image description here

+6

Source: https://habr.com/ru/post/1535639/


All Articles