Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Why is sql-92 syntax better than ansi-89 syntax?


Asked by Hazel Moses on Dec 12, 2021 SQL



One can assume that most RDBMS engines transform the syntax into an internal representation before optimizing or executing the query, so the human-readable syntax makes no difference. I also try to evangelize the SQL-92 syntax.
Thereof,
According to "SQL Performance Tuning" by Peter Gulutzan and Trudy Pelzer, of the six or eight RDBMS brands they tested, there was no difference in optimization or performance of SQL-89 versus SQL-92 style joins.
In addition, In Oracle SQL you use the plus sign (+) to tell the SQL Engine that it's an outer join. In SQL Server you should use the asterisk (*) operator to do the same. In Ansi SQL you tell the query to LEFT OUTER JOIN or RIGHT OUTER JOIN one table to another.
Besides,
As you know that ANSI SQL syntax is little difficult to follow initially. But once every body used to it, it is quite easy. Though it is considered as more complex than non-ANSI SQL standard.
In fact,
One primary advantage of the SQL-92 join notation is that there is a standard and relatively sane way of writing LEFT OUTER JOIN and variants. Each DBMS had its own variant syntax (usually bad; actually, I think, without exception the notations were bad) and often with slightly different semantics.