Introduction to SQL

Communication with relational DBMS happens in SQL. It is used to perform all the main database operations:

Data
SELECTExtract data from a database
INSERTInsert records into a database
UPDATEUpdate records in a database
DELETEDelete records from a database
Structure
CREATE DATABASECreate new databases
CREATE TABLECreate new tables in a database
Logic and access
CREATE PROCEDURECreate stored procedures
CREATE VIEWCreate views
GRANTSet permissions for tables, procedures, and views

SQL dialects (SQL extensions)

SQL is a universal language for all relational database management systems, but many DBMS make changes to the language they use, thus deviating from the standard. Such languages are called dialects or extensions of the language.

Here are some of them. As an example, let's see how each of these DBMS selects the first 3 rows.

T-SQL
SELECT TOP 3 name
Microsoft SQL Server
PL/SQL
WHERE ROWNUM <= 3
Oracle Database
MySQL
name LIMIT 3
PL/pgSQL
name LIMIT 3
PostgreSQL

Which dialect to learn?

If you know that you need to learn SQL, you should learn standard SQL. However, if you already know which specific database you will be working with, it is probably best to learn its SQL dialect and just know that different databases may use slightly different syntax.

In our course, we offer you a choice between MySQL DBMS and PostgreSQL DBMS, as the 2 most popular solutions. Try picking one right now — every example and exercise in the course will adapt to your choice:

You can switch the DBMS at any time — right here, in the gear icon menu in the site header or in the code editor.