By default, developers work with time up to the level of seconds, i.e. HOURS, MINUTES and SECONDS. There could be instances in which we may want to work on the

Finding the Current Quarter in MySQL

With MySQL, we can find out the quarter by providing a date. In the example below, we will look at the current quarter with input as current date. Query: SELECT

Getting the Last ID in MySQL

MySQL supports AUTO_INCREMENT column types where the value of a particular column can be auto incremented as, and when, the records are inserted. Many instances would need the last value

Using the WEEKOFYEAR Function in MySQL

MySQL has abundant functions that support a multitude of application needs. Here, we shall use some Calendar functionality to find in which week a given date belongs. Samples: Considering the

Use MySQL for Calculations

At times, when you want to compute the result of a mathematical formula, you can use MySQL to do the task. It is a great tool for this. Here are

User Creation and Scenarios

Please understand that this USER named SRIDHAR is created without a password and is also dangerous. CREATE USER SRIDHAR Alternatively, you can use the code below to create with a

Understanding NULL in MySQL

NULL is a unique value. It represents a value that is not defined and that is not really equal to BLANK (”). While using it in queries, we need to