Dies ist eine alte Version des Dokuments!


LU04a - Syntax of DML

As we know, SQL stands for Structured Query Language. Consequently, It should come as no surprise that SQL is indeed consistently structured.

Please note that the use og CAPITAL LETTERS for SQL commands and tabs can make it easier for you to maintain your program code.

Every SQL query is composed by three main commands:

  • SELECT column1, column2, …
  • FROM myTable
  • WHERE myCondition.

With SELECT you specify which columns you want to have output; with FROM you specify the TABLE from which the columns originate; and with WHERE you specify the condition under which the data records are selected. Where does not have to occur if there is no condition.

Let us take a table **Customers„“ which canwith in below picture. To get all information, which are stored in this table, our SQL command would be like below. Please not, that due to not prerequisits the WHERE clause is in that case not necessary.

 SELECT * 
 FROM Customers;

or as a more detailed notation

 SELECT CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country
 FROM Customers;
English German
be composed by besteht aus
notation Schreibweise

Volkan Demir

  • modul/m290/learningunits/lu04/theorie/a_syntax.1725005385.txt.gz
  • Zuletzt geändert: 2024/08/30 10:09
  • von vdemir