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?
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?
Yes you can do this, but your format is off.
INSERT INTO `Example` (`color`)
VALUES
('Red'),
('Black'),
('Green')
Each row must be separated by a comma with values for the row in parenthesis.
Here is another way that will work with any database.
insert into example
select 'Red'
from SomeSmallTable
union
select 'Blue'
from SomeSmallTable
union
select 'Green'
from SomeSmallTable