Why isn't SQL ANSI-92 standard better adopted over ANSI-89?

后端 未结 16 1746
日久生厌
日久生厌 2020-11-22 10:59

At every company I have worked at, I have found that people are still writing their SQL queries in the ANSI-89 standard:

select a.id, b.id, b.address_1
from          


        
16条回答
  •  无人及你
    2020-11-22 11:28

    Reasons people use ANSI-89 from my practical experience with old and young programmers and trainees and fresh graduates:

    • They learn SQL from existing code they see (rather than books) and learn ANSI-89 from code
    • ANSI-89 because is less typing
    • They do not think about it and use one or other style and do not even know which of both is considered new or old and do not care either
    • The idea that code is also a communication to the next programmer coming along maintaining the code does not exist. They think they talk to the computer and the computer does not care.
    • The art of "clean coding" is unknown
    • Knowledge of programming language and SQL specifically is so poor that they copy and paste together what they find elsewhere
    • Personal preference

    I personally prefer ANSI-92 and change every query I see in ANSI-89 syntax sometimes only to better understand the SQL Statement at hand. But I realized that the majority of people I work with are not skilled enough to write joins over many tables. They code as good as they can and use what they memorized the first time they encountered a SQL statement.

提交回复
热议问题