Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Now that I use mysql at $work these mysql behaviour s worry me a lot more but at least this is one mysqlism I'm not likely to fall into. I do not expect to be counting nulls in a not null table.
    • Plus, in what way is '0000-00-00' a valid date? I can only see it as a (badly) stringified version of a NULL date. Thus, it should have been disallowed as an entry in this table. IMO it should be disallowed anywhere.
      • '0000-00-00' is a valid "zero value" date in MySQL - see the docs [mysql.com] for the evil details.

        Needless to say - not my schema.

    • We had some generic SQL that applied to several tables in similar ways.

      ... and goddamn it - it's just wrong to say a table is null and not null at the same time :-)

      • Now that I work with mysql I plan to read
        http://sql-info.de/mysql/gotchas.html [sql-info.de] properly at some stage.

        At least this feature is documented in the mysql
        docs (but who ever reads the docs)

        "For DATE and DATETIME columns that are declared as NOT NULL, you can find the special date '0000-00-00' by using a statement like this:

        SELECT * FROM tbl_name WHERE date_column IS NULL

        This is needed to get some ODBC applications to work because ODBC does not support a '0000-00-00' date value."