Should I Always Fully Qualify Column Names In SQL?

后端 未结 11 1136
小鲜肉
小鲜肉 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:41

    I think it is a good idea to always use the fully qualified column name. Use an alias if the table name is too long. It also prepares your queries for futures additions of e.g. joins.

提交回复
热议问题