Interesting BUG !!

  • If you run theis query, you get what you expect..

    SELECT constid,

    id,

    colid,

    status,

    error

    FROM Sysconstraints

    If you run this query, you expect an error !!!. But guess what ..

    SELECT constid,

    id,

    colid,

    status

    error

    FROM Sysconstraints

    I have removed the ',' after the 'Status' column. This should produce an Error. It does not. It does produce a data column shift.

    Be Careful out there !!!

  • results are the same in SQL Server 2000 and 2K5

  • SELECT constid,

    id,

    colid,

    status

    error

    FROM Sysconstraints

    is the same as:

    SELECT constid,

    id,

    colid,

    status AS error

    FROM Sysconstraints

    here error is treated as the alias of column of status.

  • This is not a Bug...if you are using 2 field names without comma (,) sql server assumes that second field is the ALIAS name of the first field


    Philip

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply