Answers for "insert multiple values in one table from database mysql"

SQL
0

insert data into multiple tables mysql

BEGIN;
INSERT INTO users (username, password)
  VALUES('test', 'test');
INSERT INTO profiles (userid, bio, homepage) 
  VALUES(LAST_INSERT_ID(),'Hello world!', 'http://www.stackoverflow.com');
COMMIT;
Posted by: Guest on July-03-2020
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 "insert multiple values in one table from database mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language