Postgreslq 10 Is there a method to restrict going back in selected views?
Publicado por jorge (2 intervenciones) el 29/09/2020 02:42:29
I have 3 tables, one of which "tmp" feeds the other 2 tables. First run "upsert", all good. But the "cod_person" variant is unique in the "tmp and driver" tables, so I did a "SELECT" which will show the one that "NOT" is in the "driver" table, which "I think" is fine, but I don't understand why what the new record is entered in the "driver_false" table, since it should be the last one that was in the driver table, since "cod_person" are unique in "tmp and driver". And what I want to do is "Insert" the different value as it appears in the "SELECT <>", and then delete it from the "driver" table. ¿Could you tell me what would be the most suitable function in this case? Am I misunderstanding any concept? Is it the syntax?
Please *** DEMO: **** https://dbfiddle.uk/?rdbms=postgres_10&fiddle=656e395f1bb0c3b820ef42061d0ca742
Please *** DEMO: **** https://dbfiddle.uk/?rdbms=postgres_10&fiddle=656e395f1bb0c3b820ef42061d0ca742
Valora esta pregunta
0