🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #16941

RE: campo autonum�rico en mysql.

#16941
From: p__f
Date: Wed, 15 Mar 2000 00:00
32 lines
1377 bytes
In article <8ao8s3$g38$1@diana.bcn.ttd.net>,
"Luigi" <roberto_gamonal@hotmail.com> wrote:
> Hola de nuevo,
>
> > Estoy creando una tabla en mysql que tiene un campo autonum�rico, y
mi
> > pregunta es si se puede declarar de alguna manera, para que no haya
que
> > hacerlo manualmente.
>
> Con "hacerlo manualmente" quiero decir d�ndole los valores
consecutivos en
> los "Insert", ya que esto me obligar�a primero a leer el valor m�s
alto de
> la tabla.
>
> Salu2.
>

Al definir el campo tienes que a�adir la palabra clave AUTO_INCREMENT a
la definici�n, por ejemplo

  miCampo MEDIUMINT AUTO_INCREMENT

Saludos,

   P. F.



Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <8aojhj$21$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8ansku$5fk$1@diana.bcn.ttd.net> <8ao8s3$g38$1@diana.bcn.ttd.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,1cd316b5378f380a
X-Google-Attributes: gidf86c8,public
From: p__f@my-deja.com
Subject: RE: campo autonum�rico en mysql.
Date: 2000/03/15
Message-ID: <8aojhj$21$1@nnrp1.deja.com>
X-Deja-AN: 597886041
References: <8ansku$5fk$1@diana.bcn.ttd.net> <8ao8s3$g38$1@diana.bcn.ttd.net>
X-Http-Proxy: 1.0 x36.deja.com:80 (Squid/1.1.22) for client 194.7.150.18
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Wed Mar 15 18:07:51 2000 GMT
X-MyDeja-Info: XMYDJUIDp__f
Newsgroups: es.comp.os.linux.programacion
X-Http-User-Agent: Mozilla/4.7 [en] (X11; U; Linux 2.2.13 i586)