Hello !  

The query you mention is not the same as:  

INSERT INTO table_of_intergers SELECT seqno FROM generate ORDER BY seqno;  

Cheers !  
>  Mon Aug 17 2015 17:44:58 CEST from "John McKown"
><john.archie.mckown at gmail.com>  Subject: [sqlite] Enhance the SELECT
>statement?
>
>  I use both SQLite3 and PostgreSQL. One thing that would be really useful
> for me in SQLite3 which is in PostgreSQL is the INTO phrase. The PostgreSQL
> documentation this is here:
> http://www.postgresql.org/docs/9.4/interactive/sql-selectinto.html
> 
> The main reason that I could use this would be in conjunction with the WITH
> clause. A minor example would be:
> 
> WITH RECURSIVE generate AS
> ( SELECT 1 AS seqno UNION ALL SELECT seqno+1 FROM generate WHERE
> seqno<??limit??)
> SELECT seqno FROM generate INTO table_of_intergers ORDER BY seqno;
> 
> This could also solve the "problem" that another person had, wanting a
> sorted sequence of random numbers:
> 
> WITH RECURSIVE generate AS
> ( SELECT 1 AS seqno UNION ALL SELECT seqno+1 FROM generate WHERE
> seqno<<??number of random number??>),
> random_number_generator
> ( SELECT RANDOM() AS random_number FROM generate)
> SELECT random_number FROM random_number_generator ORDER BY random_number;
> 
> -- 
> 
> Schrodinger's backup: The condition of any backup is unknown until a
> restore is attempted.
> 
> Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.
> 
> He's about as useful as a wax frying pan.
> 
> 10 to the 12th power microphones = 1 Megaphone
> 
> Maranatha! <><
> John McKown
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
>
>  



?

Reply via email to