|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Insert_or_update and update_or_insert procedures
uhahaha a week with no answer!
postgres community sucks... |
|
#2
|
||||
|
||||
|
Quote:
Code:
UPDATE yourtable SET yourcolumn= yourcolumn +1 WHERE id = $id; IF NOT FOUND THEN INSERT INTO yourtable (id, yourcolumn) VALUES ($id, 1); END IF; Not 100% save, therefor you need a stored procedure. But that's something you can write yourself. Right?
__________________
PostgreSQL-manual |
|
#3
|
|||
|
|||
|
Quote:
Dumb posters suck (btw: this forum is not the Postgres community. The PG mailing list is probably the best contact you can get to "the community") |
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > Insert_or_update and update_or_insert procedures |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|