insert or delete

Поиск
Список
Период
Сортировка
От ZioBudda
Тема insert or delete
Дата
Msg-id Pine.LNX.4.03.9812012247560.22975-100000@michel.enter.it
обсуждение исходный текст
Список pgsql-general
Hi, i have this table libro_prestito that contains:
id_libro|id_autore
--------+---------
s1      |        5
n3      |        1
s2      |        2
k1      |        1
n2      |        2
n2    |     3
n2    |     4
n1      |        1
n1      |        4

now i must to update the id_libro column, but with this update I can have
the necessity to delete or insert some new element. My question is : is
better to delete the old reference and then insert the new or what ?
Ok, my english is very very bad. A little example: I must to change
id_libro = 'n2' in 'n3' and change/update old item and (ok, this the
maximum case, but i need one code for all) delete the item
"n2      |        4" and add the item "n2      |        5".


"Il divertimento e' giusto se la scimmia ci prende gusto"
--
Italian Linux Press: http://ziobudda.enter.it/ILP/
--
Morelli 'ZioBudda' Davide Michel - Member of Pluto Linux User Group
michel@michel.enter.it - http://ziobudda.enter.it/
Linux Problem? Ask to linux@media.dsi.unimi.it
"/dev/ziobudda: access to /var/tmp/beer denied, use /var/adm/pineapple"


В списке pgsql-general по дате отправления:

Предыдущее
От: ZioBudda
Дата:
Сообщение: an item or not?
Следующее
От: tolik@icomm.ru (Anatoly K. Lasareff)
Дата:
Сообщение: Re: [GENERAL] Dividing Money