Category Archives: SQL

Toggle states like active, deleted, etc. (bitwise negation in SQL)

Just a little trick which might be useful. It’s not new but I always enjoy using it and therefore its worth a quick post. In a lot of cases you find records in your database which hold a bit value 1/0 for fields like isActive, deleted, approved, etc. Usually they are toggled from 0 to […]

Category: SQL