Friday, September 21, 2012

Generate a lot of dummy data records rows

Create a new stored procedure:

BEGIN
 DECLARE x  INT;
 SET x = 1;

 WHILE x  <= 5 DO
  INSERT INTO PRODUCTS (CategoryID, ModelNumber, ModelName, ProductImage, UnitCost, Description) VALUES (x, x, x, x, x, x);
  SET x = x + 1;
  END WHILE;
END

And Run it.

No comments: