Conflicting Columns
Last updated
Last updated
When inserting data, conflicting columns may arise due to database constraints, such as unique keys or primary keys. QueryDeck provides mechanisms to handle such conflicts gracefully using the on_conflict
clause. This ensures that duplicate records do not cause the operation to fail and allows you to define specific actions when conflicts occur.
Choose the button with your table name (here, customers). This is used to manipulate column display
In the pop up that opens, choose conflicting columns
Now choose a constraint of your choice
Then select columns you want to include
Then click on save, to write the changes
Copy the URL endpoint from the top right corner
Now open postman and paste the link in the URL input bar, and change the method to POST
Under the "body" tab, click on "raw" and then use a request body. Here's an example body
Hit send to place the request
Here is an example response of what we should get