It's a translation and a guideEdit
This Wikibook introduces the programming language SQL as defined by ISO/IEC. The standard — similar to most standard publications — is quite technical and neither easy to read nor understand. So there is a demand for a text document explaining key features of the language. And that is what this wikibook strives to do: present a readable, understandable introduction for everyone interested in the topic.
Manuals and white papers of database vendors are also focused mainly into technical aspects of their product. As they want to set themselves apart from each other, they tend to emphasize those aspects which go beyond the SQL standard and the products from other vendors. This is contrary to our approach: we want to emphasize the common aspects.
So the main audience of this wikibook is people who want to learn the language, maybe as a beginner or as a person with existing knowledge and some degree of experience.
What is this wikibook not?Edit
First of all, this wikibook is not a reference manual for the syntax of standard SQL or any implementation. Reference manuals usually consist of definitions and explanations to those definitions. By contrast, this wikibook tries to lead you to concepts and basic commands through textual descriptions and examples. Of course we will demonstrate the syntax. But you may reckon that there are slight differences to your concrete implementation.
Also, it is not a complete tutorial. First, its focus is the standard and not any concrete implementation. When you learn a computer language it is necessary to work with it and experience with your own examples. Hence, you need a concrete implementation. And most of them differ from the standard more or less. Second, this wikibook is far away from reflecting the complete standard, e.g. the central part of the standard consists of about 18 MB text in more than 1,400 pages. But you can use this wikibook as a companion on your way learning about SQL.
How to proceed?Edit
If you are new to SQL, you should study the chapters and pages from beginning to end. For persons having some experience with SQL and interest in a specific aspect, it should be possible to navigate directly to any page.
You need not have knowledge about any other computer language, but it will be helpful.
This wikibook consists of descriptions, definitions, and examples. You should read it with care. But, it is absolutely necessary that you do some experiments with data and data structures on your own. Hence, you need access to a concrete database system where you can do read-only and read-write tests. For those tests, you can use our example database, or you may define your own tables and data.
The elements of the language SQL are case-insensitive, e.g.: it makes no difference whether you write SELECT ..., Select ..., select ... or any combination of upper and lower case characters like SeLecT .... For readability reasons, we use the convention that all language keywords are written in upper case letters and all names of user objects e.g. table and column names, are written in lower case letters.
We will write short SQL commands within one row.
SELECT street FROM address WHERE city = 'Duckburg';
For longer commands spawning multiple lines we use a tabular format.
SELECT street FROM address WHERE city IN ('Duckburg', 'Gotham City', 'Hobbs Lane');