Should I Always Fully Qualify Column Names In SQL?

后端 未结 11 1142
小鲜肉
小鲜肉 2021-02-14 02:48

Out of interest when working with SQL statements should I always use the fully qualifed column name (tablename.columnname) even if only working with one table e.g.



        
11条回答
  •  一整个雨季
    2021-02-14 03:29

    Even the most well defined systems are subject to change. A new field could quite easily be introduced to a table causing ambiguity in an existing query.

    Fully qualifying them protects you from this scenario.

提交回复
热议问题