G
G
Galdar Turin2021-07-14 14:37:42
MySQL
Galdar Turin, 2021-07-14 14:37:42

How to do phantom data entry in SQL?

There is a need to create a request to write data, but at the same time it is not permissible to execute until a flag arrives, in order to then create all the records in different tables at once. Let's just say a person sends a request to create a user and an error occurred with a duplicate key in one of the tables, 1 and 2 are valid, but 3 is not valid, it displays an error that 3 is not valid, but 1 and 2 should be rolled back. Has anyone done something similar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
full_stack_newbie, 2021-07-14
@Galdar

Place the request in a transaction.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question