SQL: Simplify and unify style for all tests

This hopefully makes the test conditions more readable and helps
avoiding mistakes when modifying them.
Merge pull request #149 from b4n/sql/tests-cleanup

SQL: Simplify and unify style for all tests