1 00:00:00,100 --> 00:00:04,210 When writing queries or reading information from a database, you generally 2 00:00:04,210 --> 00:00:09,320 issue one query at a time because you want to do something with the result set. 3 00:00:09,320 --> 00:00:13,390 However, when you're inserting values, especially when you're populating 4 00:00:13,390 --> 00:00:18,890 an initial data set, you may want to insert multiple rows at once. 5 00:00:18,890 --> 00:00:22,910 Let's look at adding some more books to our books table. 6 00:00:22,910 --> 00:00:28,513 Here's three new books we want to add, The Circle, 7 00:00:28,513 --> 00:00:32,170 Contact, and Animal Farm. 8 00:00:34,520 --> 00:00:39,140 You tend to see multiple statements like this in files that set up the initial 9 00:00:39,140 --> 00:00:43,280 state of a database, called database seed files. 10 00:00:43,280 --> 00:00:45,950 You're seeding information into the database. 11 00:00:47,050 --> 00:00:50,887 Sometimes, if you're adding a couple of entries yourself, 12 00:00:50,887 --> 00:00:55,255 you don't want to write the first bit of the query over and over again. 13 00:00:59,831 --> 00:01:03,757 What you can do is separate each of the sets of values, 14 00:01:03,757 --> 00:01:07,527 meaning the values in parentheses, with a comma. 15 00:01:19,657 --> 00:01:24,272 You can use a return in your white space between key words, values, table and 16 00:01:24,272 --> 00:01:25,440 column names. 17 00:01:25,440 --> 00:01:30,210 You may want to do this to make your SQL statement clearer to read. 18 00:01:30,210 --> 00:01:34,550 So, in short, you can insert multiple rows in a single statement. 19 00:01:34,550 --> 00:01:39,780 You'd write INSERT INTO, the set of columns in the order you want to specify 20 00:01:39,780 --> 00:01:44,587 your values, the values keyword, then each row's 21 00:01:44,587 --> 00:01:49,960 values in parentheses, with each set of values separated by a comma.