GITTA-Logo
PDF Version of this document Search Help

Lesson Navigation IconAnfragesprache SQL

Unit Navigation IconSQL Overview

Unit Navigation IconBasic database queries

LO Navigation IconSelect-From-Where

LO Navigation IconMultiple conditions

LO Navigation IconComplex conditions

LO Navigation IconArithmetische Operatoren

LO Navigation IconNon-relational constructs

LO Navigation IconSet operators

LO Navigation IconUsage of SQL

LO Navigation IconDatabase queries

Unit Navigation IconSQL Insert, Delete and Update

Unit Navigation IconSummary

Unit Navigation IconRecommended Reading

Unit Navigation IconBibliography

Unit Navigation IconMetadata


GITTA/CartouCHe news:


Go to previous page Go to next page

SELECT-FROM-WHERE clause

In languages like SQL data from a certain domain (FROM) that match some conditions (WHERE) are selected and presented (SELECT). The result can be seen as a new relation.

The syntax of a basic SQL query is:

SELECT <select-list>

FROM <from-list>

WHERE <condition>

In this syntax the...

  • <select-list> contains the names of the attributes (columns) values to be returned.
  • <from-list> is the list of the relations (tables) used for the query.
  • <condition> is an expression that identifies the tuples that we are looking for.
Basic SQL queries

We saw the basic statements that are needed for making queries with SQL. Of course there are extensions which allow more specific or more flexible queries.
These extensions include:

  • multiple conditions (in boolean AND/OR combination)
  • complex conditions (subqueries, joins etc.)
  • pattern matching and arithmetical operators
  • non-relational functions (sort, group, aggregate)
  • set operators (union, intersect, minus)
Top Go to previous page Go to next page