Skip to content

SQL Bits

You're here to find quick SQL recipes.

  • Home
  • Topics
    • Generic SQL
    • PostgreSQL
    • MariaDB
    • MySQL
    • Oracle
    • SQL Server
    • Db2
    • Informix
    • SQLite
  • Advertising
  • Write
  • About

Category: MySQL

MariaDB/MySQL: How to get the first and last day of the month

Different databases support different ways to get the first and last day of the month. Let’s see how to do it in MariaDB and MySQL.

Continue reading MariaDB/MySQL: How to get the first and last day of the month
Published January 8, 2022
Categorized as MariaDB, MySQL Tagged level-beginner

Copying tables in MariaDB and MySQL

There are many reasons why we may want to duplicate a table. We may want to copy the table structure alone, or include the rows, we may only want to copy some sample rows. Let’s see how to copy a table in MariaDB and MySQL.

Continue reading Copying tables in MariaDB and MySQL
Published September 9, 2021
Categorized as MariaDB, MySQL Tagged level-intermediate

MariaDB/MySQL: Comments on database objects

MariaDB and MySQL support a non-standard syntax to read and write comments for database objects.

Continue reading MariaDB/MySQL: Comments on database objects
Published August 9, 2021
Categorized as MariaDB, MySQL Tagged level-intermediate

Find out if you’re running MariaDB, MySQL or Percona Server

MariaDB and MySQL are mostly compatible, while Percona Server is basically MySQL with some optimisations. For this reason, it’s quite common for developers not being sure which of them they are using.

Continue reading Find out if you’re running MariaDB, MySQL or Percona Server
Published July 27, 2021
Categorized as MariaDB, MySQL Tagged level-beginner

MySQL: Find out which edition you are using

Sometimes, no one in a company knows how many databases they have, or how many commercial licenses they have. So you may be asked to write a report with all the existing MySQL instances, and whether they are Enterprise Editions or Community Editions.

Continue reading MySQL: Find out which edition you are using
Published July 27, 2021
Categorized as MySQL Tagged level-beginner
  • Twitter
  • Email
SQL Bits
Proudly sponsored by Vettabase.