General View

What is SQL?

SQL (pronounced "ess-que-el") stands for Structured Query Language. SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc. Although most database systems use SQL, most of them also have their own additional proprietary extensions that are usually only used on their system. However, the standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that one needs to do with a database. This tutorial will provide you with the instruction on the basics of each of these commands as well as allow you to put them to practice using the SQL Interpreter.

  • SQL stands for Structured Query Language
  • SQL allows you to access a database
  • SQL is an ANSI standard computer language
  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert new records in a database
  • SQL can delete records from a database
  • SQL can update records in a database
  • SQL is easy to learn

SQL Database Tables

A relational database system contains one or more objects called tables. The data or information for the database are stored in these tables. Tables are uniquely identified by their names and are comprised of columns and rows. Columns contain the column name, data type, and any other attributes for the column. Rows contain the records or data for the columns. Here is a sample table called "weather".

city, state, high, and low are the columns. The rows contain the data for this table:

Weather

city

state

high

low

Phoenix

Arizona

105

90

Tucson

Arizona

101

92

Flagstaff

Arizona

88

69

San Diego

California

77

60

Albuquerque

New
Mexico

80

72

A database most often contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data.

1.QUERY ANALYZER

The SQL Server Query Analyzer is your primary interface for running SQL queries or stored procedures.

2.ENTERPRISE MANAGER

SQL Server 2000 Enterprise Manager is the primary graphical administrative and development interface for SQL Server. There is very little SQL Server Enterprise Manager can do that you can't accomplish from a SQL command. However, using the Enterprise Manager is sometimes more convenient (especially when you are new to SQL Server 2000). You can use Enterprise Manger to create your own database, create / delete tables, query / update tables without writing SQL commands.