SQL Statement Definition

SQL Statement Definition thumbnail
Structured query language

Structured query language (SQL) makes it possible to obtain information fast from millions of records stored in a relational database though query commands. Examples of SQL software include Access, MySQL, Microsoft SQL Server 2008 and Oracle. SQL software is extensively used in business, industry and government for designing custom databases that can be queried for hidden information. SQL statements are the building blocks of SQL software and programming. SQL statement definition leads to specific outputs.

  1. What Is SQL?

    • Whenever you have to create a database or manipulate data, (that is store, update, retrieve or delete it), you will need a structured query language (SQL). It is the programming language behind applications such as Microsoft Access, MySQL, Microsoft SQL Server, Oracle, DB2 and Sybase. Using these SQL languages, software programs have been developed that find solutions to business, academic and social problems.

    History and Components

    • Developed in the 1970s by IBM, SQL was standardized by ANSI, American National Standards Institute. SQL has two main components, namely data definition language (DDL) and data manipulation language (DML). A sub-component of DDL called data control language (DCL) controls what actions a user is allowed to perform.

    Relational Database

    • Database concept
      Database concept

      A database constructed as a series of rows and columns of related data is known as a relational database. An example is a "table" consisting of name, telephone number and address of say 300 persons. In such a table, each row of data (name, telephone number, address) is called a record. Each column (say names only) is called a field. A relational database management system (RDBMS) can manipulate many such tables (rows and columns) and extract useful information. SQL originates from relational database structure and includes query language.

    What Is a Query?

    • A query is a command you give to SQL systems to perform a specific task. An example of a query is the SELECT command. It instructs SQL to select a record or columns FROM a named table. It usually ends with a semicolon, indicating the command is completed and can be executed. All SQL queries begin with a SELECT command. SQL queries are a made up of consecutive SQL statements.

    An SQL Statement

    • An example of an SQL statement is:
      SELECT snum, sname, city FROM Salespeople;
      This instructs SQL to go to a database called Salespeople. Next select and print out from the many columns, the listed columns snum, sname and city. The semicolon (;) is used to indicate that the command is complete and ready for execution. SQL statements may have sub queries, that is a query "nested" inside a bigger query.

    SQL Statement Definition Keywords

    • There are over 130 SQL keywords that are used in SQL statement definition. Some of the most common commands are SELECT, FROM, WHERE, AND, OR. Others are ANY, SOME and ALL. SQL uses CREATE, DELETE, GROUP and FORMAT in designing queries. MAX and MIN, AVG and SUM are also common SQL statements. SQL statement definition keywords are the building blocks for SQL queries. SQL statements are expressed in CAPITALS and regarded as nouns.

Related Searches:

References

Resources

  • Photo Credit chat dépendant image by A74.FR Ben Fontaine from Fotolia.com laptop with database record on 15.4" wide screen image by .shock from Fotolia.com

Comments

You May Also Like

Related Ads

Featured