Branch interview question

How to handle SQL injection How to handle race conditions