Answers for "mysql insert into select in same table"

SQL
0

how to insert same table data using mysql query

Use INSERT ... SELECT:

insert into your_table (c1, c2, ...)
select c1, c2, ...
from your_table
where id = 1
Posted by: Guest on March-30-2021
0

mysql insert multiple rows based on select

INSERT INTO table1 (col1, col2, col3, col4, col5) 
SELECT col1,col2,col3,col4,col5 
FROM table2 t2 
WHERE t2.val2 IN (MULTIPLE VALUES) 
AND (Another Conditional);
Posted by: Guest on February-12-2021

Code answers related to "mysql insert into select in same table"

Code answers related to "SQL"

Browse Popular Code Answers by Language