INSERT INTO DEVICE_BIT_NUMBER ( DEVICE_ID, CODE ) VALUES ( SELECT device_id,DEVICE_CODE FROM device_info WHERE device_code LIKE '%ZNZM%' )
提示出错,正确写法去掉“values”,如下:
INSERT INTO DEVICE_BIT_NUMBER ( DEVICE_ID, CODE ) SELECT device_id, device_code FROM device_info a WHERE a.device_code LIKE '%ZNZM%'