Back to articles list July 7, 2020 - 5 minutes read What Is a SQL Dialect, and Which one Should You Learn? Agnieszka Kozubek-Krycuń Agnieszka is a Chief Content Officer at Vertabelo. Before coming to Vertabelo, she worked as a Java programmer. She has a PhD in mathematics and over 10 years of experience in teaching mathematics and computer science at the University of Warsaw. In her free time, she enjoys reading a good book, going mountain hiking and practicing yoga. Tags: sql learn sql sql basics guide SQL, standard SQL, SQL Server, MySQL, PostgreSQL, Oracle, … You’d like to learn SQL, but you feel overwhelmed with keywords and you don’t know where to start. Let’s explain what each of those terms mean. SQL Is the Language for Talking to Databases A database is a computer program that can store and process large amounts of data. There are many different vendors of databases. PostgreSQL, MySQL, Oracle, and SQL Server are all database products by different vendors. SQL is the programming language used to talk to these databases, and each database product has its own variant of SQL. We call these variants SQL dialects. Are SQL dialects compatible? Learning SQL and its dialects is like learning English as a foreign language. If you learn “English,” you’ll be able to talk to everyone who speaks English, but maybe you won’t understand some idioms or regional accents. On the other hand, if you learn a regional version of English and use its idioms a lot, you may have trouble communicating with someone who speaks another variant of English. If you learn “SQL,” you’ll be able to talk to most databases. If you learn a vendor-specific dialect of SQL, then some of its syntax or functions may not work in a different database. The SQL Standard SQL was developed in the early 1980s. At that time, each database vendor had its own version of SQL. These SQL versions varied widely and were incompatible with each other. In the late 1980s, people started working on the “SQL standard”, a version of SQL that could be understood by most databases. SQL became a standard of the American National Standards Institute (ANSI) in 1986 and of the International Organization for Standardization (ISO) in 1987. The SQL standard has been revised multiple times since the 1980s, although the core features of the standard SQL have been stable since 1992. No database vendor is fully compatible with the standard. Most SQL scripts require at least some changes before being ported to different database systems. SQL in Big Data and NoSQL Technologies SQL is used not only in databases these days. Other data processing technologies routinely include SQL as the language to select and process data. As the amount of data in databases grew, the so-called NoSQL databases started gaining popularity. MongoDB, Cassandra, and Redis are among the most widely used NoSQL tools. Interestingly, most of these tools also include the capabilities for retrieving data with SQL. For that reason, some people prefer to call it “Not only SQL” rather than “NoSQL.” Likewise, the big data technologies, which allow you to process gigabytes of data in minutes, also offer access to data with SQL. These technologies include Presto, Hive, and Spark, among others. Which SQL Dialect Should You Select to Learn? If you know you need to learn SQL, then you should learn the standard SQL. However, if you already know with which specific database you will be working, it’s probably best to learn its SQL dialect and just be aware that different databases may use a slightly different syntax. At LearnSQL.com, we offer interactive SQL courses in standard SQL, PostgreSQL and Microsoft SQL Server dialects. We plan to add courses for more SQL dialects in the future. Drop us a line if you’re interested in a specific dialect that we don’t yet cover. If you’re a beginner, we recommend starting with our “SQL Basics” course in the variant of your choice (standard SQL, PostgreSQL, SQL Server). Read the description of our SQL Basics course in detail. Our full offering of almost 30 SQL courses is described here. Even More Keywords You may encounter other SQL-related keywords, such as T-SQL, PL/SQL, or PL/pgSQL. Let’s quickly explain what they are. Transact-SQL, often abbreviated “T-SQL,” is the dialect of SQL used in the Microsoft SQL Server database. Simply put, the SQL Server’s version of SQL has its own proper name. No other database has a proper name for their SQL dialect. If you need to learn T-SQL, we recommend you try our SQL Server courses. What about PL/SQL, or PL/pgSQL? These are languages with which to write your own functions. When you write a piece of SQL code, you usually use the constructions and functions that are predefined in your database. However, all databases allow you to create your own functions or stored procedures. These are called user-defined functions (UDF) and user-defined stored procedures (USP). UDFs and USPs are usually written by IT professionals: software engineers, SQL developers, and database administrators (DBAs). The language you use to create functions and stored procedures in Oracle is called PL/SQL (a procedural language for SQL). The language in PostgreSQL is called PL/pgSQL. PostgreSQL’s version was inspired by Oracle’s version; that’s why the names are similar. The term “Transact-SQL” or “T-SQL” is often used to mean both SQL itself as well as the procedural language in SQL Server. Other databases don’t have proper names for their procedural languages. If you’re not an IT professional, you probably don’t need to worry about learning how to write your own functions. If you plan to be an IT professional, we have a “Writing User-Defined Functions in PostgreSQL” course that teaches how to write functions in PL/pgSQL for PostgreSQL. SQL Dialects: Summary To sum it all up: SQL is the programming language you use to talk to databases and other data processing technologies. SQL Server, Oracle, MySQL, and PostgreSQL are all different databases that have their own slightly different SQL dialects. The SQL Standard is an official ANSI/ISO document that defines the syntax of SQL. No database is fully compatible with the standard. Transact-SQL, or T-SQL, is the name of the variant of SQL used in the Microsoft SQL Server database. PL/SQL is the procedural extension to SQL in the Oracle database. It is used to write your own functions and procedures in Oracle. PL/pgSQL is the procedural extension to SQL in the PostgreSQL database. It is used to write your own functions and procedures in PostgreSQL. Tags: sql learn sql sql basics guide You may also like Why Take the “SQL Basics” Course at LearnSQL.com Do you work with data? Do you want to learn the foundations of SQL? Discover why you should take our interactive online course “SQL Basics”! Read more How Long Does It Take to Learn SQL? Top Tips for SQL Proficiency How long does it take to Learn SQL? We break it down so you know exactly how long you’ll need to achieve SQL proficiency. Read more Join us on Facebook–We Can Learn More Together Join a new Facebook group, We Learn SQL, and begin sharing your learning experiences with others. It's a great place to SQL mastery, regardless of whether you are a seasoned analyst or just starting your database adventure. Read more Which Major Companies Use PostgreSQL? What Do They Use It for? Want to know which companies use PostgreSQL? Learn why they choose this solution. Read more How to Convince Your Boss That You Need to Start Learning SQL Need help persuading your boss that you need to learn SQL and that they should pay for your training? Here’s something to help! Read more Is it Difficult to Learn SQL? Wondering if it’s difficult to learn SQL? The answer is a definite “no”! Here’s how to learn SQL quickly and easily. Read more YouTube Tutorials That Actually Teach You Some SQL Do you want to learn SQL but do not want to read books or do online courses? YouTube SQL tutorials can be the answer. Here are those worth watching. Read more Should I Learn SQL as a Data Analyst? Are you a data analyst wondering if you should learn SQL? You should, and here's how! Read more Subscribe to our newsletter Join our weekly newsletter to be notified about the latest posts.