Slightly less horrible, working in all SQL adapters