SET AS HOME PAGE

ADD TO FAVORITES / BOOKMARK THIS WEBSITE (More Details)

Introduction

Servlet

Jsp

Security

Enterprise Beans

Contact Us


Steps and Procedure to Use MSSQL Query Analyzer

 Introduction

The Microsoft SQL Server 2000 Query Analyzer is a graphical tool that allows you to:
  • You can create queries and other SQL scripts and then execute it in SQL Server databases. (Query window)
  • You can quickly create commonly used database objects from predefined scripts. (Templates)
  • You can quickly copy existing database objects. (Object Browser scripting feature)
  • You can execute stored procedures without knowing the parameters. (Object Browser procedure execution feature)
  • You can debug stored procedures. (T-SQL Debugger)
  • You can debug query performance problems.
  • You can locate objects within databases or view and work with objects. (Object Browser)
  • You can quickly insert, update, or delete rows in a table. (Open Table window)
  • You can create keyboard shortcuts for frequently used queries. (shortcuts feature)
  • You can add frequently used commands to the Tools menu.

You can run SQL Query Analyzer directly from the Start menu, or you run it from inside SQL Server Enterprise Manager, or you can run SQL Query Analyzer from the command prompt by executing the isqlw utility.

 Steps to Use Microsoft SQL Query Analyzer

  1. First, goto start -> All Programs -> Microsoft SQL Server -> Query Analyzer and click the Query Analyzer
  2. Now a window will open with a Connect to SQL Server dialog box

  3. Now in the SQL Server text-box you need to type the server name (CLICK HERE for server-name) (or) type . as shown in the image below, and in the Login name text-box type sa and in the Password text-box type the password (CLICK HERE for password). I am using franklin in the Password text box
    (OR)
  4. Now click the OK button
  5. Now you can write your queries here
  6. Following is an example query
    1. Type the following query

      Create table Sample1(au_fname varchar(20), address varchar(20), city varchar(20), state varchar(20), zip varchar(20), au_id varchar(20));
      Insert into Sample1 values('Franklin', 'address', 'city', 'state', '12345', '1');

    2. Now click the Execute Query button (or) press F5 button on the keyboard
    3. Now a message will display as follows
    4. Now to view the table type the following query and then click the Execute Query button (or) press F5 button on the keyboard

      Select * from Sample1;
    5. Now the table format with the data will be displayed as follows


 Click To Go Back
<- BACK