From the course: SQL for Testers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Data generation

Solution: Data generation - SQL Tutorial

From the course: SQL for Testers

Start my 1-month free trial

Solution: Data generation

(upbeat music) - [Narrator] In the last video, I gave you a challenge to try and generate some data in a few different ways. I hope you tried those challenges out on your own and were able to create the necessary queries. In this video, I'll show you how I went about solving those challenges, so you can see what the solutions would look like. So the first challenge was to duplicate the rows in the product table, so that there are twice as many items available in our store. So we know we want to duplicate, so we're going to need to add more rows to the table, so we're going to need to use an insert into, and we know we're going to need insert into the products table, so we'll include that. And now we don't want to just set each row one at a time manually, so we don't want to do this set manual workflow. Instead, what we will do is we will select *FROM products. And now this is a bit tricky, so hopefully you were able to figure this out, but you can just select all the items from the…

Contents