Thread

  1. Re: [GENERAL] delete columm help

    Oliver Elphick <olly@lfix.co.uk> — 1998-05-28T04:42:15Z

    Joao Paulo Felix wrote:
      >Hi there,
      >
      >I am just starting to use PostgreSQL, and I couldn't find the answer on
      >the
      >PostgreSQL site...so if any one could help me it would be very
      >appreciated.
      >
      >1) Good books/reference on PostgreSQL for a novice?
    
    I know of no book specifically on PostgreSQL.  For SQL, a very good book 
    is "The Practical SQL Handbook" by Bowman, Emerson and Darnovsky,
    ISBN 0-201-44787-8.
    
      >2) How do I delete a columm from a table, I have tried to use the
      >following:
      >
      >DELETE FROM table_name columm_name
      
    The command for changing columns in a table is ALTER TABLE.  At present,
    there is no facility to drop columns.
    
    Create a new table with the correct columns; copy from the old table
    to the new; DROP the old table; use ALTER TABLE to rename the new one.
    
    -- 
    Oliver Elphick                                Oliver.Elphick@lfix.co.uk
    Isle of Wight                              http://www.lfix.co.uk/oliver
                   PGP key from public servers; key ID 32B8FAA1
                     ========================================
         "Wait on the LORD; be of good courage, and he shall 
          strengthen thine heart; wait, I say, on the LORD."
                                        Psalms 27:14