I've got a list 400 rows +. Each row looks similar to this: example-example123 I would like to remove everything past '-' so that I'm left with just the beginning part: example123 Any help would be greatly appreciated.
try it like this:
UPDATE table SET column_name=LEFT(column_name, INSTR(column_name, '-')-1)
WHERE INSTR(column_name, '-')>0;
If you only want to select you do it this way:
SELECT LEFT(column_name, INSTR(column_name, '-')-1) FROM table;
INSTR
function gets you the position of your -
then you update the column value to become from the first letter of the string till the position of the -
-1
Here's a fiddle