Skip to content
Advertisement

SQL – remove trailing “/” in url with querystring

I have table with 2 columns where in one of them an url is stored.

Now I would need to update the table to remove all trailing slashes from the urls, including urls that have a query string.

Examples:

I’ve found how to do it for a trailing slash, but not when it’s inside the url.

Does anyone have an idea how to do this? Can I use a regex of some kind?

Advertisement

Answer

Working SQLFiddle

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement