Structured Query Language (SQL)

Definition of Structured Query Language (SQL) in The Network Encyclopedia.

What is Structured Query Language (SQL)?

A standards-based language used by relational database management programs primarily for constructing queries. Structured Query Language (SQL) was originally developed by IBM for mainframe computing environments and is widely used in relational database management systems.

The standard version of SQL is defined by the American National Standards Institute (ANSI), but many vendors have made enhancements to its syntax and command functions. The latest SQL standard is called SQL-92 but is more properly known as ANSI standard SQL X3.135-1992 or International Organization for Standardization (ISO) standard ISO/IEC 9075:1992.

How It Works

SQL includes a number of statements that can be used to perform different types of relational operations on the contents of a database, including creating databases and database objects, modifying these objects, and querying databases for information. The most basic SQL statement is the SELECT statement, which you can use to retrieve rows and columns of data from database tables and format the results set. The typical format of a SELECT statement is

SELECT <columns> FROM <tables> WHERE <rows>

where a group of columns are retrieved from a table or tables in which data values are restricted to a particular row or rows. To return all the columns from a table, you can use a wildcard (but this is generally inefficient and should be avoided):

SELECT * FROM <tables>

Microsoft SQL Server conforms to the ANSI SQL-92 standard and enhances this standard with additional statements for certain types of applications, such as data warehousing and Internet/intranet applications.


If possible, include a WHERE clause in a SELECT statement to restrict the scope of your query and avoid unnecessary expenditure of system resources. The WHERE clause can include various comparison and logical operators, such as =, >, LIKE, BETWEEN, AND, and IS NULL.