update entire table (with PostGreSQL alone)?
От | yruhn |
---|---|
Тема | update entire table (with PostGreSQL alone)? |
Дата | |
Msg-id | 200308221048.AA48889986@xdh.nl обсуждение исходный текст |
Ответы |
Re: update entire table (with PostGreSQL alone)?
Re: update entire table (with PostGreSQL alone)? |
Список | pgsql-general |
Dear anyone, I wish to update an entire table with just using (PostGre)SQL (=preferably without resorting to C, Python or so). Can I?If so how? For example, I want to update/replace table: a | b | c ---+---+--- 1 | 2 | 3 4 | 5 | 6 7 | 8 | 9 with table: a | b | c ---+---+--- 1 | 2 | 2 4 | 5 | 6 9 | 0 | 0 So, I wish to: 1- update every data point in the table (based on the UNIQUE column 'a' (=PRIMARY KEY)), and if this value of a is not present(such as for instance value 9: 9,0,0),I wish to; 2- insert a new row with data points 3- and I want to delete old rows that are not used present in the new table (such as row 7 : 7,8,9) How can I update an entire table with just using (PestGre)SQL? Lots of thanks for any help anyone can give me, Wiliam Knobbel, PhD-Student
В списке pgsql-general по дате отправления: