GITTA-Logo
PDF Version of this document Search Help

Lesson Navigation IconStructured Query Language SQL

Unit Navigation IconSQL overview

Unit Navigation IconCreation and modification of tables

Unit Navigation IconBasic database queries

LO Navigation IconSelect-From-Where

LO Navigation IconMultiple conditions

LO Navigation IconComparison operators

LO Navigation IconArithmetical operators

LO Navigation IconNested queries

LO Navigation IconJoin

LO Navigation IconNon-relational constructs

LO Navigation IconSet operators

LO Navigation IconSummary

LO Navigation IconDatabase queries

Unit Navigation IconSQL Insert, Delete and Update

Unit Navigation IconUsage of SQL

Unit Navigation IconSummary

Unit Navigation IconRecommended Reading

Unit Navigation IconBibliography

Unit Navigation IconMetadata


GITTA/CartouCHe news:


Go to previous page Go to next page

Summary

In this Unit it was shown step by step how SQL statements are phrased. To show all the parts in context a complete SQL request is listed below.

Complete syntax of a SQL request:

SELECT [DISTINCT | ALL]

<Attribute> [AS <Name>] [, ...] | *

FROM <Relation> [, <Relation>]

[WHERE <Condition>]

[GROUP BY <Column> [HAVING <Condition>]

[ORDER BY <Column> [ASC | DESC], [, ...]];

A large part of this syntax is optional and only needs to be stated only in certain cases. Teh simplest syntactically correct request has only a SELECT- and a FROM-part. Only with more complex problems, all parts are used in the same request.

remarkIt is possible that certain datasets appear more than once in the result of a request. The keyword DISTINCT is used to delete such duplicates from the result. The keyword ALL is used to prevent the duplicates from deletion. This is the default and does not have to be stated explicitly.
Top Go to previous page Go to next page