Make a range in postgres

How can I make a range in a select in PostgreSQL? I'd like to have this result:

num
---
1
2
3
4
5
6

From a query like:

SELECT range(1,6) AS num;

Answers


SELECT  *
FROM    generate_series(1, 6) num

Need Your Help

How do I make a table to hold the content in my design?

html html-table

I created a design for my website. I am planning to make it with TABLES because it seems to be the easiest. The tables are not going the way I intended.

Formatting Strings in JavaScript to use as HTML "MAILTO" links

javascript html mailto

Here are some strings that I'm using to ultimately form a HTML mailto link. I'm doing this in javascript. If I output the mailtoString to an alert() I get the link looks just fine. However, when...