| From: | tania gutierrez <tanitamile(at)yahoo(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | UNIQUE INDEX and SEQUENCE |
| Date: | 2003-02-27 14:37:14 |
| Message-ID: | 20030227143714.76623.qmail@web40605.mail.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
hello poststoneware friends
I need orientacion stops: another form to insert in
the table
proximo value of sequencia for the id_usuario.
and as I use usuary create UNIQUE INDEX
usuario_id_usuario_pk on usuario (id_usuario);
//*************
CREATE SEQUENCE usuario_id_usuario_seq start 1
increment 1 maxvalue 2147483647 minvalue 1 cache 1;
create table usuario(
id_usuario int4 DEFAULT
nextval('usuario_id_usuario_seq'::text) NOT NULL,
nombre text not null,
passwd text not null,
tipo integer not null,
correo text,
Constraint usuario_pk Primary Key (id_usuario)
);
create UNIQUE INDEX usuario_id_usuario_pk on usuario
(id_usuario);
//*************************
for insert a values:
insert into usuario(nombre, passwd, tipo,
correo)values ('tania','aaaaaa', 1,
'tanitamile(at)yahoo(dot)com');
//*******************************
thanks
_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Serodio | 2003-02-27 14:50:45 | Re: UNIQUE INDEX and SEQUENCE |
| Previous Message | srini srini | 2003-02-27 12:16:50 | postgreSQL dirver compatibility to Oracle DB |