我有一张表,上面有这样的行:
| Country.Number | Country | | US.01 | USA | | US.02 | USA |
我想将其修改为:
| Country | Number | Country | | US | 01 | USA | | US | 02 | USA |
是否有捷径可寻?
询问:
UPDATE TABLE SET Number = SUBSTRING_INDEX('Country.Number', '.', -1), Country.Number = SUBSTRING_INDEX('Country.Number', '.', 1);