Why check the current user in MySQL? For audits, permissions and custom logic. Here are the methods, from user() and current_user() to mysql.user.
MySQL – How to Drop Table If Exists in Database?
SQL Server 2016 added DROP IF EXISTS, but MySQL has had it for years. Here is how to drop table if exists in a MySQL database.
MySQL – ELT() and FILED() Functions to Extract Index Position From List
MySQL’s ELT() returns the value at a given index position in a list, and FIELD() does the reverse. Here is how both functions work, with simple examples.
MySQL – How to Generate Random Number
MySQL’s UUID() function returns a random 36 character value. Here is how to generate random number strings and passwords of any length from it.
SQL SERVER – Script: Finding Cumulative IO Per Database File
A simple script to find cumulative IO per database file in SQL Server, and the real scenarios where this number helps you.
MySQL – Date and Time Related System Functions
MySQL has several date and time related system functions, like curdate(), curtime(), now(), current_timestamp() and UTC versions such as utc_timestamp().





