increment lines based on a postgresql record

Asked

Viewed 34 times

1

I have a query that returns the amount and initial value and I want to transform this query into several lines according to the quantity.

Example:

Consultation:

select 3 as numero, 10001 as valorinicial

Expected exit:

 id | valor
 ----------

  1. 10001
  2. 10002
  3. 10003

Any suggestions with postgresql or postgresql/php?

1 answer

2


  • fantastic, just what I was looking for!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.