Thomson Reuters interview question

how to write a trigger in sql? when should you do it?