Reputation: 55
I have a table MG_DEVICE_GROUP_IN_GEOZONE that has two columns
| deviceGroup_id| geozone_id|
| ------------- | --------- |
I want to insert multiple values to both columns:
I'm tried to use this query:
insert into MG_DEVICE_GROUP_IN_GEOZONE (deviceGroup_id, geozone_id)
values (4525, (select id from MG_GEOZONE where account_id = 114 and zoneType in (0, 1 , 3)));
But I receiving error - "[21000][1242] Subquery returns more than 1 row"
I understand why this error appeared but I can't find the right query to do this. Please help me. Thanks
Upvotes: 0
Views: 61