66
Views
5
Comments
Solved
MYsql - Insert select
Question

hi there,

i want to insert bulkly using insert select in mysql.

how to "insert select from" in mysql ?

regards and thanks

2025-01-09 14-56-57
IQ78
Solution

it work like this:

"insert into {aggregatename}(colomnname)
SELECT tbl.colomnname
from {aggregatename} tbl
where id = 1"

2019-05-22 11-30-09
Marcelo Ferreira

Hi,

Did you check this component? or you can try and use an advance query with something like this:

INSERT INTO table_name(column_list)

SELECT    select_list 

FROM    another_table 

WHERE   condition;

Regards,

Marcelo

2022-09-27 20-37-09
Renata Dias Lage Pereira

if you are in the .NET version you can use this component https://www.outsystems.com/forge/component-overview/1117/bulkinsert that does exactly what you want.

2025-01-09 14-56-57
IQ78

Thanks all,

I use java stack

Can we use just query advance? Tq

2019-05-22 11-30-09
Marcelo Ferreira

Hi,

You should be able to do it the way I told but to be honest I didn't try it. Give it a try and let us know how it goes.

Regards,

Marcelo

2025-01-09 14-56-57
IQ78
Solution

it work like this:

"insert into {aggregatename}(colomnname)
SELECT tbl.colomnname
from {aggregatename} tbl
where id = 1"

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.