Re: conditional insert
От | Pau Marc Muñoz Torres |
---|---|
Тема | Re: conditional insert |
Дата | |
Msg-id | CADFuJLi3K0X1A7OwR+9_neWjKCEXtYYyMP_n=x5z=D2+GNCTNw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: conditional insert (Thomas Kellerer <spam_eater@gmx.net>) |
Ответы |
Re: conditional insert
|
Список | pgsql-general |
i don't see it clear, let me put an example
i got the following table
molec varchar(30)
seq varchar(100)
where I insert my values
lets image that i have a record introduced as ('ubq', 'aadgylpittrs')
how i can prevent to insert another record where molec='ubq' ?
thanks
--
Pau Marc Muñoz Torres
Laboratori de Biologia Computacional
Institut de Biotecnologia i Biomedicina Vicent Villar
Universitat Autonoma de Barcelona
E-08193 Bellaterra (Barcelona)
telèfon: (+34)935 86 89 39
Email : paumarc.munoz@bioinf.uab.cat
i got the following table
molec varchar(30)
seq varchar(100)
where I insert my values
lets image that i have a record introduced as ('ubq', 'aadgylpittrs')
how i can prevent to insert another record where molec='ubq' ?
thanks
2011/9/5 Thomas Kellerer <spam_eater@gmx.net>
Pau Marc Muñoz Torres, 05.09.2011 11:38:INSERT INTO xxxHi follk
i trying to performe a conditional insert into a table, indeed, what i'm trying to do is not insert a record into the table if that record exist
googleling i found something like
insert into XX values (1,2,3) where not exist (select ....);
but i'm having and error near where...
anyone knows how do i can perfome this insert?
SELECT 1,2,3
WHERE NOT EXISTS (SELECT ...)
Regards
Thomas
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
Pau Marc Muñoz Torres
Laboratori de Biologia Computacional
Institut de Biotecnologia i Biomedicina Vicent Villar
Universitat Autonoma de Barcelona
E-08193 Bellaterra (Barcelona)
telèfon: (+34)935 86 89 39
Email : paumarc.munoz@bioinf.uab.cat
В списке pgsql-general по дате отправления: