Partners Group Interview Question

How to check a database integrity with SQL?