postgres.rst
changeset 2420 da418d28831e
parent 2399 ed213cf36a1c
child 2421 07304e8a9820
equal deleted inserted replaced
2419:277c739d96c6 2420:da418d28831e
   623   do $$
   623   do $$
   624   begin
   624   begin
   625       perform 1 union all select 2;
   625       perform 1 union all select 2;
   626   end$$;
   626   end$$;
   627 
   627 
   628 
   628 Temporary constant table
       
   629 ========================
       
   630 
       
   631 Standard SQL syntax::
       
   632 
       
   633   SELECT 1 AS num, 'a' AS str
       
   634   UNION ALL SELECT 2, 'b'
       
   635   UNION ALL SELECT 3, 'c';
       
   636 
       
   637 Postgre extension::
       
   638 
       
   639   SELECT num, str FROM (
       
   640     VALUES (1, 'a'), (2, 'b'), (3, 'c')) AS tbl(num, str);
       
   641 
       
   642 To generate table::
       
   643 
       
   644   SELECT val FROM generate_series(1, 10) val;
       
   645