I have a column of urls like http://mydomain/app?u=asdfa&b=fnsn
with varying number of parameters. I would like to remove all the string after question mark onwards and get distict urls.
CodePudding user response:
substring_index(url, '?', 1)
will return everything before the first ? or the entire url if there is no ?