I have a table called cartypes which currently has 2 fields: id & type. I am adding subtype and I want to move the contents after the dash -
from the field called type and put those contents into subtype. Disposing of the dash (any extra whitespace too for that matter). What's the best SQL query for this?
before:
id type subtype (currently empty)
------------------------------------------------------------------------------
1 legendary muscle car - steel
2 crappy sedan - plasticky interior
3 legendary sports car - aluminum bodywork
4 compact car
after:
id type subtype
---------------------------------------------------------------
1 legendary muscle car steel
2 crappy sedan plasticky interior
3 legendary sports car aluminum bodywork
4 compact car