• The best practice is to always prefix column names, which prevents such errors.

    Cheers,

    Alex Kuznetsov,

    SQL Server MVP