Concurrent connections to the same table We are a small firm, with about 10 people using a database server.

I have this application that connects to a database and fills about 40 rows of data in an table. Then calls a stored procedure to process the data before inserting the data back into another table and then truncates the table.

Is it possible if two people run the application at the same time, the data can be nonsensical. If so, how can I prevent this?
One approach:


At the beginning of the operations use SELECT GET_LOCK('no-nonsense');
At the end, do SELECT RELEASE_LOCK('no-nonsense');