Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to insert the same values at once (Mysql)? [duplicate]

Tags:

sql

mysql

insert

If i have a table that Example is and one coloumn in it that (for example) colour is how i can do something like;

    INSERT INTO Example VALUES ('Red','Black','Green');

instead of writing the code 3 times seperatly for each value?

like image 697
ProgrammerPotato Avatar asked Dec 10 '25 23:12

ProgrammerPotato


1 Answers

INSERT INTO Example (column_name) VALUES ('Red'),('Black'),('Green');
like image 165
Joe Frambach Avatar answered Dec 12 '25 11:12

Joe Frambach