0

Sql developer es correcto?

Insert into tabla select nombre, count(*) from tabla 2 group by nombre union all select nombre,count(*) from tabla 3 group by nombre;

5th Dec 2019, 4:57 AM
beto
1 ответ
+ 3
I think it's ok. But, if "tabla 1" has more fields than the select, then you must specify the names of the fields where you wants to insert. You must do it between parentheses and just after the words "Insert into tabla". It is even a good practice to do so, even if the table has the same number of fields and in the same order as the select.
4th Jan 2020, 3:32 AM
Javier Ballesteros
Javier Ballesteros - avatar