[sql] show single-row results in the command-line and fix some minor fixes