LESSON 2 / 62 · Introduction to SQLIntroduction to SQL
Defining the SQL language. Dialects (extensions) of SQL. Differences between T-SQL, PL/SQL, PL/pgSQL.
SQL is a structured query language that is used as an efficient way to store data, search for its parts, update, extract from the database, and delete.
Communication with relational DBMS happens in SQL. It is used to perform all the main database operations:
DataSELECTExtract data from a databaseINSERTInsert records into a databaseUPDATEUpdate records in a databaseDELETEDelete records from a databaseStructureCREATE DATABASECreate new databasesCREATE TABLECreate new tables in a databaseLogic and accessCREATE PROCEDURECreate stored proceduresCREATE VIEWCreate viewsGRANTSet 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-SQLSELECT TOP 3 nameMicrosoft SQL ServerPL/SQLWHERE ROWNUM <= 3Oracle DatabaseMySQLname LIMIT 3PL/pgSQLname LIMIT 3PostgreSQL
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:
MySQL8.4The web classic: easy to start, running everywhereThe most widespread open-source DBMS in the worldPowers WordPress, YouTube and Booking.comPostgreSQL17.9Power and precision: the startup favouriteRich syntax and strict adherence to the SQL standardChosen by Instagram, Spotify and Reddit
You can switch the DBMS at any time — right here, in the gear icon menu in the site header or in the code editor.