May 12, 2021 at 4:44 pm
Comments posted to this topic are about the item Conditional DELETE and INSERT in PostgreSQL
Sabyasachi Mukherjee
June 18, 2021 at 2:18 pm
Thank you. I am starting to work on converting MS SQL to PostgreSQL so this is helpful.
There is some minor confusion in your first example. Based on the order of the INSERT statements I would have thought that the David record would have been assigned employee_id of 3. However this row gets deleted because he was apparently assigned employee_id 2? Is there something else going on that would have changed the order of assignment?
I get what you are showing, but it seems that might be confusing for some who are not familiar with the SERIAL pseudo-type and sequences.
June 19, 2021 at 5:04 am
You're right Tim. Now I remember, possibly I ran the query in the other order for David and Stephen. Later when I attached the queries for reference, I pasted in other order. Rightly pointed out. Thanks.
Sabyasachi Mukherjee
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy