Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I generate scripts for all tables with single stroke in SQL Server 2000? [closed]

Tags:

How do I generate scripts for all tables with a single stroke in SQL Server 2000?

like image 871
Ganesamoorthy Avatar asked Feb 25 '11 07:02

Ganesamoorthy


People also ask

How do you get create script for all tables in SQL Server?

Generate Database Script in SQL Server Now right-click the database then Tasks->Generate scripts. After that a window will open. Select the database and always check "script all objects in the selected database". It will generate a script for all the tables, sp, views, functions and anything in that database.


1 Answers

You can't do this with one click of a button.

You have to:

  • Right click Database
  • Select All Tasks > Generate SQL Scripts
  • Click Show All
  • Check All Tables
  • Click the Formatting tab. Select the options you require
  • Click the Options tab. You may want to script out the Indexes, Full-Text Indexes, Triggers, Primary & Foreign Keys.
  • Then choose whether you want it all in one file or one file per object.
like image 188
codingbadger Avatar answered Oct 16 '22 12:10

codingbadger