How to add or remove leading 0 in mysql db tamil | trim function concat function in mysql tamil

preview_player
Показать описание
Learn about how to add zero 0 before the single digit numbers in mysql query tamil | how to remove the leading zero 0 from the mysql string tamil | how to update query for add leading zero in mysql tamil | how to trim the leading zero from mysql string in tamil | how to set where condition in update query in mysql db tamil | how to get char length of the column in mysql db

if you want to add leading zero or before the single digit number then you have to use the following query to update the column.

UPDATE table_name set column_name=CONCAT('0',column_name) where char_length(column_name)=1;

here concat function is used to concatenation of the string and char_length function is used to find the character length of the string.

if you want to remove the leading zero 0 then you have give the following query

UPDATE table_name set column_name=TRIM(LEADING '0' FROM column_name) where char_length(column_name)=2;

here trim function is used to remove the character from the mysql string.
Рекомендации по теме
Комментарии
Автор

I have referred many videos, this one was simple and perfect. Thankyou 🙏

abisheksivakumar
welcome to shbcf.ru