9 lines
215 B
MySQL
9 lines
215 B
MySQL
|
UPDATE IGNORE vn.dms
|
||
|
SET dmsTypeFk = (SELECT id FROM vn.dmsType WHERE code = 'vehicle')
|
||
|
WHERE id IN (
|
||
|
SELECT d.id
|
||
|
FROM vn.dms d
|
||
|
JOIN vn.dmsType dt ON dt.id = d.dmsTypeFk
|
||
|
WHERE dt.code = 'vehicles'
|
||
|
);
|