What is this textbook devoted to?

This book is devoted to practical use of the  SQL(Structured Query Language) is a database computer language designed for the retrieval and management of data in relational database management systems (RDBMS), database schema creation and modification, and database object access control management.SQL language and, in the first place, to retrieving data from relational databases. Thus, it is mostly focused on the SELECT statement, the most complicated one in terms of syntax. However, here you will also find necessary information about other Data Manipulation Language (DML) statements, i.e. about the INSERT, UPDATE, and DELETE statements used for modifying data. Later, we plan to add chapters devoted to the sublanguage for specifying the database schema (Data Definition Language,  DDL) that allows creating and altering database objects, such as tables and views.

Such an approach has been chosen because the book is intended mostly for DBMS users and developers who are primarily interested in problems of retrieving information from existing databases, with creating and modifying logical data storage structures being of less importance to them.

All sample queries in the textbook can be executed online against a real database server. You also can edit existing queries and create new ones from scratch using a built-in editor, and run them against the server, as well.

A number of chapters contain exercises recommended for a better comprehension and retention of the subject matter. To make sure your solution is correct, you can use the check system on the SQL Excercises website these exercises have been borrowed from.

Following a well-established practice, we offer you an opportunity to learn from other peoples mistakes. At the same time, when analyzing erroneous solutions to some of the exercises, we dont present the final correct solution in most cases. There are two reasons for that:

  • Most exercises can be solved in different ways; thus, by giving away the correct solution, we would limit the readers creative activity.
  • SQL-EX.RU help and support experience has shown solving an exercise on ones own has a better learning effect.

To be fair, correcting the analyzed wrong queries shouldnt be too difficult after the cause of error is identified and explained.

The aforementioned erroneous solutions are not artificially invented. Those are queries written by website visitors who, after several unsuccessful attempts to solve the exercise, asked for an explanation why their seemingly correct solution didnt pass the check. That is why we dare to say exploring the causes of such typical errors will help achieving a much better progress in SQL studies than a mere review of usage examples of certain language constructs.

Bookmark and Share
aggregate functions Airport ALL AND AS keyword ASCII AVG Battles Bezhaev Bismarck C.J.Date calculated columns Cartesian product CASE cast CHAR CHARINDEX Chebykin check constraint classes COALESCE common table expressions comparison predicates Computer firm CONSTRAINT CONVERT correlated subqueries COUNT CROSS APPLY CTE data type conversion data types database schema date/time functions DATEADD DATEDIFF DATENAME DATEPART DATETIME DDL DEFAULT DEFAULT VALUES DELETE DISTINCT DML duplicates EXCEPT exercise (-2) exercise 19 exercise 23 More tags
The book was updated
several days ago
©SQL-EX,2008 [Evolution] [Feedback] [About] [Links] [Team]
All right reserved.
Rambler's Top100