6

It's typical for a Relational Database Management System to use a specific variant of SQL. For example, SQL Server uses Transact-SQL aka T-SQL.

I understand MariaDB is based on MySQL (the RDBMS), and the SQL variant that MySQL uses is apparently itself also called MySQL (according to this question). Should I assume MariaDB also uses the MySQL language?

I have tried several Google searches, but I've found nothing. It's tricky because of the conflation between the RDBMS and the language. Most results are just comparing MariaDB with MySQL (the RDBMS).

Kyle Delaney
  • 11,616
  • 6
  • 39
  • 66
  • 2
    The scripting language for MariaDB is essentially the same as the scripting language for MySQL. – Gordon Linoff Nov 03 '17 at 19:50
  • 4
    Usually SQL dialects don't have names. Oracle uses SQL and so do MySQL, PostgreSQL, etc. And they just call this SQL. T-SQL by Sybase und Microsoft is an exception. – Thorsten Kettner Nov 03 '17 at 19:51
  • Why was my question downvoted? – Kyle Delaney Nov 04 '17 at 20:32
  • 1
    Why are people voting to close? The question is clear, it cites a source, it's fully tagged... – Kyle Delaney Nov 07 '17 at 17:24
  • 1
    @KyleDelaney I agree this is an important question. I use XAMPP (which uses MariaDB) for local PHP development and Google CloudSQL (which uses MySQL) and a few of the queries I was using for XAMPP broke once I deployed to CloudSQL. There are subtle differences in SQL dialects and for less experienced devs figuring out these difference takes hours and lots of pain & frustration (at least in my case ) – ideaguy3d Jul 05 '20 at 19:55

1 Answers1

6

MariaDB does indeed use the same SQL dialect as MySQL.

But, later versions of MariaDB have extra features, which show up mostly as settings and functions in the query language. The MariaDB team's list of differences is here: https://mariadb.com/kb/en/library/mariadb-vs-mysql-features/

The big ones, from my personal perspective, mostly in MariaDB 10.2 and later.

Before MySQL 8, MariaDb had some capabilities absent in MySQL. These are all in MySQL 8+

MySQL Version 8 has better versions of REGEXP_REPLACE() and REXEXP_SUBSTR() than MariaDb's versions of the two.

O. Jones
  • 103,626
  • 17
  • 118
  • 172