Обсуждение: void UPDATE function?

Поиск
Список
Период
Сортировка

void UPDATE function?

От
Adam Haberlach
Дата:
    What is a good way to trigger an UPDATE of a row without actually
changing anything?  I have a trigger that will update the timestamp
of a record, and in this case, want to trigger it because I am
adding a related row in another table.

UPDATE bugs WHERE pkey='3'

Doesn't seem to work.

--
Adam Haberlach            |A cat spends her life conflicted between a
adam@newsnipple.com       |deep, passionate, and profound desire for
http://www.newsnipple.com |fish and an equally deep, passionate, and
'88 EX500                 |profound desire to avoid getting wet.

RE: void UPDATE function?

От
"Francis Solomon"
Дата:
Hi Adam,

Would this work?

UPDATE bugs SET somefield=somefield WHERE pkey='3';

i.e. set a field to itself. I don't know whether or not this would be
optimised away - but it could be worth a try.

Hope this helps.

Francis Solomon

>
>     What is a good way to trigger an UPDATE of a row
> without actually
> changing anything?  I have a trigger that will update the timestamp
> of a record, and in this case, want to trigger it because I am
> adding a related row in another table.
>
> UPDATE bugs WHERE pkey='3'
>
> Doesn't seem to work.