devxlogo

MySQL

Understanding UNION in MySQL

Assuming there are tables EMP and EMP2, which have the same schema, and there are possible duplicate IDs present in them???the following query will help us identify the unique records:

Using IFNULL in MySQL

There are numerous cases in which you get null and are not able to handle it effectively in the code. MySQL has a command that can help you know if

Knowing the Version and Supported Engines in MySQL

The following commands are handy to know the current version and the supported engines in the MySQL. Command: SELECT VERSION()Output: 5.6.31-enterprise-commercial-advanced-logCommand: SHOW ENGINESOutput: InnoDBCSVMyISAMBLACKHOLEMEMORYFEDERATEDARCHIVEMRG_MYISAMPERFORMANCE_SCHEMA

Purging Binary Logs in MySQL

All data modifications of MySQL are updated onto logs in binary format. At times, if maintenance such as backup is not in place, and the data storage reaches the maximum

Limiting the Rows Returned in MySQL

There are many times when you are running on low memory and want to limit the data in your transactions. Especially, when you are sure that you don’t need all

Using BETWEEN in MySQL Queries

Assuming you have a column in a table of type DATETIME, and you want to filter it based on dates and time as well, BETWEEN will be helpful. Listing 1.