[linux-programlama] Re: postgresql auto_increment

---------

From: Devrim GUNDUZ (devrim@gunduz.org)
Date: Sun 04 May 2003 - 09:11:42 EEST

  • Next message: onuryalazi@mersin.edu.tr: "[linux-programlama] Ynt: kutuphaneler"

    Merhaba,

    On 4 May 2003, Enver ALTIN wrote:

    > Kolay cozum:
    >
    > CREATE TABLE deneme (
    > id serial, -- Aradiginiz bu.
    > deneme varchar(50)
    > );

    Eksik :)

    http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=datatype.html#DATATYPE-SERIAL

    ==
    Note: Prior to PostgreSQL 7.3, serial implied UNIQUE. This is no
    longer automatic. If you wish a serial column to be UNIQUE or a PRIMARY
    KEY it must now be specified, same as with any other data type.
    ==
    Yani, ustteki tablo tanimini su sekilde yapmak gerekli:
            ..
            id SERIAL UNIQUE,
            ..

    Saygılar.

    -- 
    Devrim GUNDUZ
    devrim@gunduz.org				devrim.gunduz@linux.org.tr 
    			http://www.gunduz.org
    

  • Next message: onuryalazi@mersin.edu.tr: "[linux-programlama] Ynt: kutuphaneler"

    ---------

    Bu arsiv hypermail 2.1.6 tarafindan uretilmistir.