in reply to Re^3: Substitute "Yes" for "1" in mysql query output?
in thread Substitute "Yes" for "1" in mysql query output?

Yes, shortly after I posted, i saw poj's reply and thought "Hey, that's even better!". The only nag was, that it's not Perl :-)

On the latter point (and your point), there may still be different views, how the database distinguishes true from false, and how Perl (and/or the respective script) does that. The best way to minimize conflicts seems to be laid out over there (CHECK constraint on the column). But of course, a real Boolean column type would be better.

  • Comment on Re^4: Substitute "Yes" for "1" in mysql query output?

Replies are listed 'Best First'.
Re^5: Substitute "Yes" for "1" in mysql query output?
by Marshall (Canon) on Jan 26, 2017 at 12:32 UTC
    I didn't know about: CREATE TABLE foo(mycolumn BOOLEAN NOT NULL CHECK (mycolumn IN (0,1)));

    but we agree, "But of course, a real Boolean column type would be better".