2

How would I insert a range of numbers into a MYSQL table? I'm missing something very obvious!

Here's my example:

MYSQL

INSERT INTO stock_figures (product_id)
VALUES (13275 BETWEEN 13341)

I want to insert into the product_id column all of the numbers between 13275 and 13341 inclusive.

Can somebody please assist? Thanks

UPDATE

I would like to avoid creating a procedure or a temporary table as this is only being used for a single query. I feel this qualifies as different enough to not be marked as a duplicate.

aphextwix
  • 1,838
  • 3
  • 21
  • 27

0 Answers0