Conditions for sql states