Replace space to hyphen in MySql

Again, I am publishing another mysql query to replace the space with the hyphen.

Below is the replace space to hyphen in MySql Query:-

SELECT `id` , name, REPLACE( LCASE( name ) , ' ', '-' ) AS alias1 FROM `url`

I hope above code will help you.

This entry was posted in Development, MySql and tagged , . Bookmark the permalink.

One Response to Replace space to hyphen in MySql

  1. Bertha says:

    I can’t believe I’ve been going for years without kowning that.

Leave a Reply

Your email address will not be published. Required fields are marked *

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.