How to Get row from mysql based on the sequence of values in the WHERE IN
you can use the FIELD() function example In this query, we are selecting all rows from mytable where the id column matches one of the values in the WHERE IN…
How add days , month or year from any date in MySql
DATE_ADD is a date function in SQL that adds a specified interval to a date and returns the resulting date. The syntax of DATE_ADD function is: where date is the…
Retrieve a specific string from a column in a table using MySql.
In MySQL, you can use the SUBSTRING and LOCATE functions to retrieve a specific string from a column in a table. Here’s how you can use SUBSTRING and LOCATE in…
How to change a decimal to a nearest whole number in MySql ?
To change a decimal to the nearest whole number in MySQL, you can use the ROUND() function or the CEIL() function you can also use FLOOR() function. How to use…
How to show 0 on MySQL if value is null ?
In this Blog post, we will show you how to handle null values in MySQL by replacing them with a default value of your choice. Specifically, we will explain how…
How to Rotate row as column on mysql using case
Sometime we need to show row data as a column so this is possible by using case on mysql database. A MySQL pivot table is a way to transform data…
How to get all users details in single row from mysql database
On this blog I will explain how to show the users details in single row some time we this type of query in our project First I create a table…
How to select only date from a DATETIME Field in MySql ?
Example:- Data on database column just like 30-12-2022 01:14:41 Now you want to only date so you run below query
UPDATE Query On MySql With Inner Join
Sometime we need to update data on database table that contain related type column so we use update query with inner join On this example we have two table first…