Thread

  1. CREATE VIEW interp AS select DISTINCT itemkey from songs;

    Peter Schaefer <schaefer@cys.de> — 1999-10-13T08:36:57Z

    Excuse my weak knowledge of SQL, but this doesn't work the way I expect it to work:
    
    codiak=> CREATE VIEW interp AS select DISTINCT ON id id from interp;
    CREATE
    codiak=> select id from interp where id=1063;
    id
    -------
       1063
       1063
       1063
    (3 rows)
    
    codiak=> \d interp
    
    Table    = interp
    +----------------------------------+----------------------------------+-------+
    |              Field               |              Type                | Length|
    +----------------------------------+----------------------------------+-------+
    | id                               | int4                             |     4 |
    +----------------------------------+----------------------------------+-------+
    
    -- 
    Peter Schäfer - mailto:schaefer@cys.de, schaefer@dfu.de
    Motto of the 3D Designer: "I am a meshed potato, I can do the twist".