Working with SqlManagementStudio 2008

Basic Operations


  1. Graphically Inserting /Editing data(below 200 only; otherwise use INSERT command)
    Right click on Table => Edit Top 200 Rows => Enter/ Modify data as you want. (for >200 => Right click on Editor => Select Pane|SQL => modify Top(200) to Top(400)=> insert data)
  2. Creating/Executing SP , Triggers , Functions etc.
    Open your database => Open Programmatics Node => then you will find each these objects ; you can perform CRUD for them.
    For executing programmatic objects; right click on it and select Execute option e.g., ExecueStoredProcedure

SCRIPT Generation

  1. Script Generation for TABLE-CREATE; Right click on Db-Table =>Script Table as => Select CREATE Table (other DDL/DML commands available) => File (orCipboard) => Enter file name
  2. Script generation for whole database including Tables, SPs, Views etc. Right click on Database => Tasks => GenerateScript =>Select All/specific Db objects => Next;
  3. Executing generated Script; Open the .script file in SqlServerMgmntStudio by right click on it; then execute the script by right click on script => Execute.
  4.  Script generation for Schema + Data;
    •   Right click on the database and go to Tasks -> Generate Scripts
    •   Select the tables (or object) that you want to generate the script against.
    •   Go to Set scripting options and click on the Advanced button.
    •   In the General category, go to Type of data to script
    •   There are 3 options: Schema Only, Data Only, and Schema and Data. Select the appropriate option and click on OK.
  5. You will then get the CREATE TABLE statement and all of the INSERT statements for the data straight out of SSMS.



3 comments:

  1. The blog gave me idea to work with SQL management studio My Sincere thanks for sharing this post
    Dot Net Training in Chennai

    ReplyDelete
  2. This is very nice blog,and it is helps for student's.Thanks for sharing nice post.
    You can also visit here asp.net training gurgaon

    ReplyDelete