{"id":13988,"date":"2025-07-12T17:20:05","date_gmt":"2025-07-12T15:20:05","guid":{"rendered":"https:\/\/www.salvis.com\/blog\/?p=13988"},"modified":"2025-07-14T09:03:31","modified_gmt":"2025-07-14T07:03:31","slug":"outer-joining-with-ansi-sql-89-and-sql-92","status":"publish","type":"post","link":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/","title":{"rendered":"Outer Joining With ANSI SQL-89 and SQL-92"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>I recently implemented a quick fix for the rule <a href=\"https:\/\/dblinter-rules.united-codes.com\/rules\/G-3130\/\">G-3130<\/a> to transform queries to ANSI SQL-92 syntax. One of the challenges was to handle Oracle&#8217;s outer-join syntax <code>(+)<\/code>. In ANSI SQL-89, join and filter criteria are part of the WHERE clause.  It&#8217;s not easy to distinguish them. In this blog post, I explain why it is important to do that when using outer joins, regardless of which join syntax you prefer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Data Setup<\/h2>\n\n\n\n<p>All examples in this blog post are based on the tables <code>DEPT<\/code> and <code>EMP<\/code>, that were originally present in every Oracle Database instance as part of the <code>SCOTT<\/code> schema. Here&#8217;s a script to create these tables. The script requires an Oracle Database 23ai. <\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">1) Create table DEPT and EMP<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>create table if not exists dept as select * from (values\n          (10, 'ACCOUNTING', 'NEW YORK'),\n          (20, 'RESEARCH',   'DALLAS'),\n          (30, 'SALES',      'CHICAGO'),\n          (40, 'OPERATIONS', 'BOSTON')\n       ) s (deptno, dname, loc);\n\ncreate table if not exists emp as select * from (values\n          (7839, 'KING',   'PRESIDENT', null, date '1981-11-17', 5000, null, 10),\n          (7566, 'JONES',  'MANAGER',   7839, date '1981-04-02', 2975, null, 20),\n          (7698, 'BLAKE',  'MANAGER',   7839, date '1981-05-01', 2850, null, 30),\n          (7782, 'CLARK',  'MANAGER',   7839, date '1981-06-09', 2450, null, 10),\n          (7788, 'SCOTT',  'ANALYST',   7566, date '1987-04-19', 3000, null, 20),\n          (7902, 'FORD',   'ANALYST',   7566, date '1981-12-03', 3000, null, 20),\n          (7499, 'ALLEN',  'SALESMAN',  7698, date '1981-02-20', 1600,  300, 30),\n          (7521, 'WARD',   'SALESMAN',  7698, date '1981-02-22', 1250,  500, 30),\n          (7654, 'MARTIN', 'SALESMAN',  7698, date '1981-09-28', 1250, 1400, 30),\n          (7844, 'TURNER', 'SALESMAN',  7698, date '1981-09-08', 1500,    0, 30),\n          (7900, 'JAMES',  'CLERK',     7698, date '1981-12-03',  950, null, 30),\n          (7934, 'MILLER', 'CLERK',     7782, date '1982-01-23', 1300, null, 10),\n          (7369, 'SMITH',  'CLERK',     7902, date '1980-12-17',  800, null, 20),\n          (7876, 'ADAMS',  'CLERK',     7788, date '1987-05-23', 1100, null, 20)\n       ) s (empno, ename, job, mgr, hiredate, sal, comm, deptno);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">create<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">table<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">not<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">exists<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">dept<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #C586C0\">as<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #4EC9B0\">select<\/span><span style=\"color: #D4D4D4\"> * <\/span><span style=\"color: #4EC9B0\">from<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #4EC9B0\">values<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (10, <\/span><span style=\"color: #CE9178\">&#39;ACCOUNTING&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&#39;NEW YORK&#39;<\/span><span style=\"color: #D4D4D4\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (20, <\/span><span style=\"color: #CE9178\">&#39;RESEARCH&#39;<\/span><span style=\"color: #D4D4D4\">,   <\/span><span style=\"color: #CE9178\">&#39;DALLAS&#39;<\/span><span style=\"color: #D4D4D4\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (30, <\/span><span style=\"color: #CE9178\">&#39;SALES&#39;<\/span><span style=\"color: #D4D4D4\">,      <\/span><span style=\"color: #CE9178\">&#39;CHICAGO&#39;<\/span><span style=\"color: #D4D4D4\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (40, <\/span><span style=\"color: #CE9178\">&#39;OPERATIONS&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&#39;BOSTON&#39;<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">       ) <\/span><span style=\"color: #4EC9B0\">s<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #9CDCFE\">deptno<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">dname<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">loc<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">create<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">table<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #C586C0\">if<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">not<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">exists<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">emp<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #C586C0\">as<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #4EC9B0\">select<\/span><span style=\"color: #D4D4D4\"> * <\/span><span style=\"color: #4EC9B0\">from<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #4EC9B0\">values<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7839, <\/span><span style=\"color: #CE9178\">&#39;KING&#39;<\/span><span style=\"color: #D4D4D4\">,   <\/span><span style=\"color: #CE9178\">&#39;PRESIDENT&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-11-17&#39;<\/span><span style=\"color: #D4D4D4\">, 5000, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 10),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7566, <\/span><span style=\"color: #CE9178\">&#39;JONES&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;MANAGER&#39;<\/span><span style=\"color: #D4D4D4\">,   7839, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-04-02&#39;<\/span><span style=\"color: #D4D4D4\">, 2975, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 20),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7698, <\/span><span style=\"color: #CE9178\">&#39;BLAKE&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;MANAGER&#39;<\/span><span style=\"color: #D4D4D4\">,   7839, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-05-01&#39;<\/span><span style=\"color: #D4D4D4\">, 2850, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 30),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7782, <\/span><span style=\"color: #CE9178\">&#39;CLARK&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;MANAGER&#39;<\/span><span style=\"color: #D4D4D4\">,   7839, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-06-09&#39;<\/span><span style=\"color: #D4D4D4\">, 2450, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 10),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7788, <\/span><span style=\"color: #CE9178\">&#39;SCOTT&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;ANALYST&#39;<\/span><span style=\"color: #D4D4D4\">,   7566, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1987-04-19&#39;<\/span><span style=\"color: #D4D4D4\">, 3000, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 20),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7902, <\/span><span style=\"color: #CE9178\">&#39;FORD&#39;<\/span><span style=\"color: #D4D4D4\">,   <\/span><span style=\"color: #CE9178\">&#39;ANALYST&#39;<\/span><span style=\"color: #D4D4D4\">,   7566, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><span style=\"color: #D4D4D4\">, 3000, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 20),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7499, <\/span><span style=\"color: #CE9178\">&#39;ALLEN&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;SALESMAN&#39;<\/span><span style=\"color: #D4D4D4\">,  7698, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-02-20&#39;<\/span><span style=\"color: #D4D4D4\">, 1600,  300, 30),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7521, <\/span><span style=\"color: #CE9178\">&#39;WARD&#39;<\/span><span style=\"color: #D4D4D4\">,   <\/span><span style=\"color: #CE9178\">&#39;SALESMAN&#39;<\/span><span style=\"color: #D4D4D4\">,  7698, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-02-22&#39;<\/span><span style=\"color: #D4D4D4\">, 1250,  500, 30),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7654, <\/span><span style=\"color: #CE9178\">&#39;MARTIN&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&#39;SALESMAN&#39;<\/span><span style=\"color: #D4D4D4\">,  7698, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-09-28&#39;<\/span><span style=\"color: #D4D4D4\">, 1250, 1400, 30),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7844, <\/span><span style=\"color: #CE9178\">&#39;TURNER&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&#39;SALESMAN&#39;<\/span><span style=\"color: #D4D4D4\">,  7698, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-09-08&#39;<\/span><span style=\"color: #D4D4D4\">, 1500,    0, 30),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7900, <\/span><span style=\"color: #CE9178\">&#39;JAMES&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;CLERK&#39;<\/span><span style=\"color: #D4D4D4\">,     7698, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><span style=\"color: #D4D4D4\">,  950, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 30),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7934, <\/span><span style=\"color: #CE9178\">&#39;MILLER&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&#39;CLERK&#39;<\/span><span style=\"color: #D4D4D4\">,     7782, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1982-01-23&#39;<\/span><span style=\"color: #D4D4D4\">, 1300, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 10),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7369, <\/span><span style=\"color: #CE9178\">&#39;SMITH&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;CLERK&#39;<\/span><span style=\"color: #D4D4D4\">,     7902, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1980-12-17&#39;<\/span><span style=\"color: #D4D4D4\">,  800, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 20),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          (7876, <\/span><span style=\"color: #CE9178\">&#39;ADAMS&#39;<\/span><span style=\"color: #D4D4D4\">,  <\/span><span style=\"color: #CE9178\">&#39;CLERK&#39;<\/span><span style=\"color: #D4D4D4\">,     7788, <\/span><span style=\"color: #9CDCFE\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1987-05-23&#39;<\/span><span style=\"color: #D4D4D4\">, 1100, <\/span><span style=\"color: #9CDCFE\">null<\/span><span style=\"color: #D4D4D4\">, 20)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">       ) <\/span><span style=\"color: #4EC9B0\">s<\/span><span style=\"color: #D4D4D4\"> (<\/span><span style=\"color: #9CDCFE\">empno<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">ename<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">job<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">mgr<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">hiredate<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">sal<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">comm<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">deptno<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Joins<\/h2>\n\n\n\n<p>The predecessor of the ANSI SQL-92 standard is the ANSI SQL-89 standard. Based on that standard, you could write joins only like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">2) ANSI SQL-89 Join<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename\n  from dept, emp\n where emp.deptno = dept.deptno\n order by dept.deptno, emp.ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept, emp<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME \n---------- ------\n        10 CLARK \n        10 KING  \n        10 MILLER\n        20 ADAMS \n        20 FORD  \n        20 JONES \n        20 SCOTT \n        20 SMITH \n        30 ALLEN \n        30 BLAKE \n        30 JAMES \n        30 MARTIN\n        30 TURNER\n        30 WARD  \n\n14 rows selected. <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 CLARK <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 KING  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 FORD  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 JONES <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SMITH <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 ALLEN <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 BLAKE <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 JAMES <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 MARTIN<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 TURNER<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 WARD  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">14 rows selected. <\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>In the FROM clause, we list the tables to be joined, and in the WHERE clause, we define the JOIN criteria. There are no filter criteria in this case.<\/p>\n\n\n\n<p>There are several ways to transform this query to ANSI SQL-92. One rather silly way, but very similar to the original ANSI SQL-89 syntax, is the use of an explicit CROSS JOIN.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">3) ANSI SQL-92 Cross Join <\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename\n  from dept cross join emp\n where emp.deptno = dept.deptno\n order by dept.deptno, emp.ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept <\/span><span style=\"color: #569CD6\">cross join<\/span><span style=\"color: #D4D4D4\"> emp<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>While this is technically an ANSI SQL-92 compliant query, it&#8217;s not a good option. Why? &#8211; ANSI SQL-92 allows us to define the join criteria for each join. Using a CROSS JOIN implies that there is no join criterion between these tables, which is wrong.<\/p>\n\n\n\n<p>A better option is to use an INNER JOIN, like in the next example.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">4) ANSI SQL-92 Inner Join<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename\n  from dept join emp on emp.deptno = dept.deptno\n order by dept.deptno, emp.ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept <\/span><span style=\"color: #569CD6\">join<\/span><span style=\"color: #D4D4D4\"> emp <\/span><span style=\"color: #569CD6\">on<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>We see that the WHERE clause is gone. Why? &#8211;  Because we do not have filter criteria in this query. No WHERE clause, no filter. As simple as that.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Outer Joins<\/h2>\n\n\n\n<p>Now let&#8217;s write an outer join with ANSI SQL-89. As I mentioned before, the standard back then only defined INNER JOINs. So, we need to work around it. One way is something like this:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">5) ANSI SQL-89 Outer Join<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename\n  from dept, emp\n where emp.deptno = dept.deptno\nunion all\nselect dept.deptno, null\n  from dept\n where not exists (\n          select 1\n            from emp\n           where emp.deptno = dept.deptno\n       )\n order by deptno, ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept, emp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #569CD6\">union<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">all<\/span><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, <\/span><span style=\"color: #569CD6\">null<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">not<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">exists<\/span><span style=\"color: #D4D4D4\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">          <\/span><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #B5CEA8\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> emp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">           <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">       )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> deptno, ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME \n---------- ------\n        10 CLARK \n        10 KING  \n        10 MILLER\n        20 ADAMS \n        20 FORD  \n        20 JONES \n        20 SCOTT \n        20 SMITH \n        30 ALLEN \n        30 BLAKE \n        30 JAMES \n        30 MARTIN\n        30 TURNER\n        30 WARD  \n        40       \n\n15 rows selected. <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 CLARK <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 KING  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 FORD  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 JONES <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SMITH <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 ALLEN <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 BLAKE <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 JAMES <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 MARTIN<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 TURNER<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        30 WARD  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        40       <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">15 rows selected. <\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Phew, that&#8217;s a lot of work. It&#8217;s no surprise that database vendors came up with proprietary solutions for outer joins. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>*=<\/code> and <code>=*<\/code> operators in Sybase\/SQL Server<\/li>\n\n\n\n<li><code>(+)<\/code> operator in Db2 and the Oracle Database<\/li>\n<\/ul>\n\n\n\n<p>Let&#8217;s use the Oracle join syntax.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">6) Oracle-style Outer Join<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename\n  from dept, emp\n where emp.deptno (+) = dept.deptno\n order by dept.deptno, emp.ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept, emp<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno (+) = dept.deptno<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Much simpler. <code>EMP<\/code> is outer joined due to the <code>(+)<\/code> operator.<\/p>\n\n\n\n<p>And here is an ANSI SQL-92 compliant variant:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">7) ANSI SQL-92 Outer Join<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename\n  from dept left join emp on emp.deptno = dept.deptno\n order by dept.deptno, emp.ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept <\/span><span style=\"color: #569CD6\">left join<\/span><span style=\"color: #D4D4D4\"> emp <\/span><span style=\"color: #569CD6\">on<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>No WHERE clause, no filter. So far, so good.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Outer Joins With Additional Filters<\/h2>\n\n\n\n<p>The problem starts as soon as you use outer join queries with filter predicates. Here&#8217;s an example.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">8a) Outer Join With Filter &#8211; Oracle-style<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename, emp.hiredate\n  from dept, emp\n where emp.deptno (+) = dept.deptno\n   and emp.hiredate (+) > date '1981-12-03'\n order by deptno, ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename, emp.hiredate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept, emp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno (+) = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #569CD6\">and<\/span><span style=\"color: #D4D4D4\"> emp.hiredate (+) &gt; <\/span><span style=\"color: #569CD6\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> deptno, ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME  HIREDATE  \n---------- ------ ----------\n        10 MILLER 23.01.1982\n        20 ADAMS  23.05.1987\n        20 SCOTT  19.04.1987\n        30                  \n        40                  <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME  HIREDATE  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------ ----------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER 23.01.1982<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS  23.05.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT  19.04.1987<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">        30                  <\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">        40                  <\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">8b) Outer Join With Filter &#8211; ANSI SQL-92<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename, emp.hiredate\n  from dept\n  left join emp on emp.deptno = dept.deptno\n   and emp.hiredate > date '1981-12-03'\n order by deptno, ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename, emp.hiredate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">left join<\/span><span style=\"color: #D4D4D4\"> emp <\/span><span style=\"color: #569CD6\">on<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #569CD6\">and<\/span><span style=\"color: #D4D4D4\"> emp.hiredate &gt; <\/span><span style=\"color: #569CD6\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> deptno, ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME  HIREDATE  \n---------- ------ ----------\n        10 MILLER 23.01.1982\n        20 ADAMS  23.05.1987\n        20 SCOTT  19.04.1987\n        30                  \n        40                  <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME  HIREDATE  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------ ----------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER 23.01.1982<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS  23.05.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT  19.04.1987<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">        30                  <\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">        40                  <\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Both query variants use the predicate <code>emp.hiredate &gt; date '1981-12-03'<\/code> as part of the outer join criteria. As a result, the DEPT rows 30 and 40 are shown with empty EMP columns. <\/p>\n\n\n\n<p>The result is correct. But is this the result we want?<\/p>\n\n\n\n<p>I don&#8217;t think so. One option is that we don&#8217;t want an outer join at all. Something like this:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">9a) Inner Join With Filter &#8211; ANSI SQL-89<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename, emp.hiredate\n  from dept, emp\n where emp.deptno = dept.deptno\n   and emp.hiredate > date '1981-12-03'\n order by deptno, ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename, emp.hiredate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept, emp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #569CD6\">and<\/span><span style=\"color: #D4D4D4\"> emp.hiredate &gt; <\/span><span style=\"color: #569CD6\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> deptno, ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME  HIREDATE  \n---------- ------ ----------\n        10 MILLER 23.01.1982\n        20 ADAMS  23.05.1987\n        20 SCOTT  19.04.1987<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME  HIREDATE  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------ ----------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER 23.01.1982<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS  23.05.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT  19.04.1987<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">9b) Inner Join With Filter &#8211; ANSI SQL-92<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename, emp.hiredate\n  from dept\n  join emp on emp.deptno = dept.deptno\n where emp.hiredate > date '1981-12-03'\n order by deptno, ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename, emp.hiredate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">join<\/span><span style=\"color: #D4D4D4\"> emp <\/span><span style=\"color: #569CD6\">on<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.hiredate &gt; <\/span><span style=\"color: #569CD6\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> deptno, ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME  HIREDATE  \n---------- ------ ----------\n        10 MILLER 23.01.1982\n        20 ADAMS  23.05.1987\n        20 SCOTT  19.04.1987<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME  HIREDATE  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------ ----------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER 23.01.1982<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS  23.05.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT  19.04.1987<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Now we use the predicate <code>emp.hiredate &gt; date '1981-12-03'<\/code> as a filter criterion. It&#8217;s applied after the join. The result would be the same if we used a LEFT JOIN in 9b).<\/p>\n\n\n\n<p>In most cases, join criteria are based only on the foreign key-primary key relationships. If I see something else, I typically need to dig deeper to understand what the requirements of the query are.<\/p>\n\n\n\n<p>So, maybe we want to see only the employees that match the filter, including departments that have no employees. For that, we could rewrite the query as follows:<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">10a) Outer Join With Filter &#8211; Oracle-style<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename, emp.hiredate\n  from dept, emp\n where emp.deptno (+) = dept.deptno\n   and (emp.hiredate > date '1981-12-03' or emp.deptno is null)\n order by deptno, ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename, emp.hiredate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept, emp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> emp.deptno (+) = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\">   <\/span><span style=\"color: #569CD6\">and<\/span><span style=\"color: #D4D4D4\"> (emp.hiredate &gt; <\/span><span style=\"color: #569CD6\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">or<\/span><span style=\"color: #D4D4D4\"> emp.deptno <\/span><span style=\"color: #569CD6\">is null<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> deptno, ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME  HIREDATE  \n---------- ------ ----------\n        10 MILLER 23.01.1982\n        20 ADAMS  23.05.1987\n        20 SCOTT  19.04.1987\n        40                  <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME  HIREDATE  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------ ----------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER 23.01.1982<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS  23.05.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT  19.04.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        40                  <\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);--cbp-line-highlight-color:rgba(234, 191, 191, 0.2);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">10b) Outer Join With Filter &#8211; ANSI SQL-92<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>select dept.deptno, emp.ename, emp.hiredate\n  from dept left join emp\n    on emp.deptno = dept.deptno\n where (emp.hiredate > date '1981-12-03' or emp.deptno is null)\n order by deptno, ename;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">select<\/span><span style=\"color: #D4D4D4\"> dept.deptno, emp.ename, emp.hiredate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">  <\/span><span style=\"color: #569CD6\">from<\/span><span style=\"color: #D4D4D4\"> dept <\/span><span style=\"color: #569CD6\">left join<\/span><span style=\"color: #D4D4D4\"> emp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">on<\/span><span style=\"color: #D4D4D4\"> emp.deptno = dept.deptno<\/span><\/span>\n<span class=\"line cbp-line-highlight\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">where<\/span><span style=\"color: #D4D4D4\"> (emp.hiredate &gt; <\/span><span style=\"color: #569CD6\">date<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&#39;1981-12-03&#39;<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">or<\/span><span style=\"color: #D4D4D4\"> emp.deptno <\/span><span style=\"color: #569CD6\">is null<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">order by<\/span><span style=\"color: #D4D4D4\"> deptno, ename;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>    DEPTNO ENAME  HIREDATE  \n---------- ------ ----------\n        10 MILLER 23.01.1982\n        20 ADAMS  23.05.1987\n        20 SCOTT  19.04.1987\n        40                  <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">    DEPTNO ENAME  HIREDATE  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">---------- ------ ----------<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        10 MILLER 23.01.1982<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 ADAMS  23.05.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        20 SCOTT  19.04.1987<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        40                  <\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n\n\n\n<p>This example shows why it&#8217;s important to distinguish between join criteria and filter criteria. The ANSI SQL-92 syntax makes this easier. Unfortunately, there are still a few bugs and limitations when using ANSI-92 syntax in every Oracle Database version. But there are fewer and fewer of these problems with each new version. <\/p>\n\n\n\n<p>Therefore, I use the ANSI SQL-92 join syntax whenever possible and try to document the reason when I cannot. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Use dbLinter to Change Queries to ANSI SQL-92 Join Syntax<\/h2>\n\n\n\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Grisselbav.dblinter\">dbLinter<\/a> can find queries that do not use ANSI SQL-92 join syntax. Simply put, it searches for multiple items in the FROM clause. It also provides a quick fix to convert ANSI SQL-89 and Oracle-style joins to ANSI SQL-92 syntax. Here&#8217;s a screenshot with the previously discussed queries:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"845\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10-1024x845.png\" alt=\"dbLinter for VS Code showing G-3130 violations and the pop-up window to apply quick fixes\" class=\"wp-image-13999\" style=\"width:820px\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10-1024x845.png 1024w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10-300x248.png 300w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10-768x634.png 768w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10-1536x1268.png 1536w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10-91x75.png 91w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10-480x396.png 480w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-10.png 1640w\" sizes=\"auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>After applying the quick fix to all <a href=\"https:\/\/dblinter-rules.united-codes.com\/rules\/G-3130\/\">G-3130<\/a> violations in the file, the result looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9-1024x768.png\" alt=\"dbLinter for VS Code after applying the quick fix for all G-3130 violations\" class=\"wp-image-13998\" style=\"width:640px\" srcset=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9-1024x768.png 1024w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9-300x225.png 300w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9-768x576.png 768w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9-100x75.png 100w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9-480x360.png 480w, https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/image-9.png 1280w\" sizes=\"auto, (max-width:767px) 480px, (max-width:1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>The result looks quite good, except that the predicate in the 8a) example is not moved to the join condition (see red arrow in the screenshot above). Why is that the case? &#8211; The quick fix only moves equality predicates and predicates that are not part of a Boolean OR condition to the join condition. If there are leftover outer join operators <code>(+)<\/code> in the WHERE clause, they are surrounded by a TODO comment.<\/p>\n\n\n\n<p>To get started with <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=Grisselbav.dblinter\">dbLinter<\/a>, I recommend <a href=\"https:\/\/youtu.be\/V-ePBfUFhhk\">watching Philipp Harenfeller&#8217;s video<\/a>. United Codes and Grisselbav are collaborating on this product.<\/p>\n\n\n\n<p>Feedback is very much appreciated. Comment on this blog post or raise an issue on the <a href=\"https:\/\/github.com\/Grisselbav\/dbLinter\">dbLinter GitHub repository<\/a>.<\/p>\n\n\n\n<p>Thanks.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction I recently implemented a quick fix for the rule G-3130 to transform queries to ANSI SQL-92 syntax. One of the challenges was to handle Oracle&#8217;s outer-join syntax (+). In ANSI SQL-89, join and filter criteria are part of the WHERE clause. It&#8217;s not easy to distinguish them. In this blog post,<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":14004,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[86,151,85],"class_list":["post-13988","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracle","tag-code-analysis","tag-dblinter","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Outer Joining With ANSI SQL-89 and SQL-92 - Philipp Salvisberg&#039;s Blog<\/title>\n<meta name=\"description\" content=\"Rewrite SQL joins from ANSI SQL-89 to SQL-92 with a focus on Oracle&#039;s outer join syntax. Includes working examples and recommendations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Outer Joining With ANSI SQL-89 and SQL-92 - Philipp Salvisberg&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Rewrite SQL joins from ANSI SQL-89 to SQL-92 with a focus on Oracle&#039;s outer join syntax. Includes working examples and recommendations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/\" \/>\n<meta property=\"og:site_name\" content=\"Philipp Salvisberg&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-12T15:20:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-14T07:03:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/outer-joining-with-ansi-sql-89-and-sql-92-1024x683.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Philipp Salvisberg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@phsalvisberg\" \/>\n<meta name=\"twitter:site\" content=\"@phsalvisberg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Philipp Salvisberg\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/\"},\"author\":{\"name\":\"Philipp Salvisberg\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"headline\":\"Outer Joining With ANSI SQL-89 and SQL-92\",\"datePublished\":\"2025-07-12T15:20:05+00:00\",\"dateModified\":\"2025-07-14T07:03:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/\"},\"wordCount\":911,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"image\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/outer-joining-with-ansi-sql-89-and-sql-92.png\",\"keywords\":[\"Code Analysis\",\"dbLinter\",\"SQL\"],\"articleSection\":[\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/\",\"name\":\"Outer Joining With ANSI SQL-89 and SQL-92 - Philipp Salvisberg&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/outer-joining-with-ansi-sql-89-and-sql-92.png\",\"datePublished\":\"2025-07-12T15:20:05+00:00\",\"dateModified\":\"2025-07-14T07:03:31+00:00\",\"description\":\"Rewrite SQL joins from ANSI SQL-89 to SQL-92 with a focus on Oracle's outer join syntax. Includes working examples and recommendations.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/outer-joining-with-ansi-sql-89-and-sql-92.png\",\"contentUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/07\\\/outer-joining-with-ansi-sql-89-and-sql-92.png\",\"width\":1536,\"height\":1024,\"caption\":\"Outer Joining With ANSI SQL-89 and SQL-92\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/2025\\\/07\\\/12\\\/outer-joining-with-ansi-sql-89-and-sql-92\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Outer Joining With ANSI SQL-89 and SQL-92\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/\",\"name\":\"Philipp Salvisberg&#039;s Blog\",\"description\":\"Database-centric development\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/#\\\/schema\\\/person\\\/34352245c48678b1a5a05d4bc1339515\",\"name\":\"Philipp Salvisberg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"url\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"contentUrl\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\",\"width\":400,\"height\":400,\"caption\":\"Philipp Salvisberg\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.salvis.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/11\\\/phs_trivadis4.jpg\"},\"sameAs\":[\"http:\\\/\\\/www.salvis.com\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Outer Joining With ANSI SQL-89 and SQL-92 - Philipp Salvisberg&#039;s Blog","description":"Rewrite SQL joins from ANSI SQL-89 to SQL-92 with a focus on Oracle's outer join syntax. Includes working examples and recommendations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/","og_locale":"en_US","og_type":"article","og_title":"Outer Joining With ANSI SQL-89 and SQL-92 - Philipp Salvisberg&#039;s Blog","og_description":"Rewrite SQL joins from ANSI SQL-89 to SQL-92 with a focus on Oracle's outer join syntax. Includes working examples and recommendations.","og_url":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/","og_site_name":"Philipp Salvisberg&#039;s Blog","article_published_time":"2025-07-12T15:20:05+00:00","article_modified_time":"2025-07-14T07:03:31+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/outer-joining-with-ansi-sql-89-and-sql-92-1024x683.png","type":"image\/png"}],"author":"Philipp Salvisberg","twitter_card":"summary_large_image","twitter_creator":"@phsalvisberg","twitter_site":"@phsalvisberg","twitter_misc":{"Written by":"Philipp Salvisberg","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#article","isPartOf":{"@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/"},"author":{"name":"Philipp Salvisberg","@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"headline":"Outer Joining With ANSI SQL-89 and SQL-92","datePublished":"2025-07-12T15:20:05+00:00","dateModified":"2025-07-14T07:03:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/"},"wordCount":911,"commentCount":0,"publisher":{"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"image":{"@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#primaryimage"},"thumbnailUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/outer-joining-with-ansi-sql-89-and-sql-92.png","keywords":["Code Analysis","dbLinter","SQL"],"articleSection":["Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/","url":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/","name":"Outer Joining With ANSI SQL-89 and SQL-92 - Philipp Salvisberg&#039;s Blog","isPartOf":{"@id":"https:\/\/www.salvis.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#primaryimage"},"image":{"@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#primaryimage"},"thumbnailUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/outer-joining-with-ansi-sql-89-and-sql-92.png","datePublished":"2025-07-12T15:20:05+00:00","dateModified":"2025-07-14T07:03:31+00:00","description":"Rewrite SQL joins from ANSI SQL-89 to SQL-92 with a focus on Oracle's outer join syntax. Includes working examples and recommendations.","breadcrumb":{"@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#primaryimage","url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/outer-joining-with-ansi-sql-89-and-sql-92.png","contentUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2025\/07\/outer-joining-with-ansi-sql-89-and-sql-92.png","width":1536,"height":1024,"caption":"Outer Joining With ANSI SQL-89 and SQL-92"},{"@type":"BreadcrumbList","@id":"https:\/\/www.salvis.com\/blog\/2025\/07\/12\/outer-joining-with-ansi-sql-89-and-sql-92\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.salvis.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Outer Joining With ANSI SQL-89 and SQL-92"}]},{"@type":"WebSite","@id":"https:\/\/www.salvis.com\/blog\/#website","url":"https:\/\/www.salvis.com\/blog\/","name":"Philipp Salvisberg&#039;s Blog","description":"Database-centric development","publisher":{"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.salvis.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.salvis.com\/blog\/#\/schema\/person\/34352245c48678b1a5a05d4bc1339515","name":"Philipp Salvisberg","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","url":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","contentUrl":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg","width":400,"height":400,"caption":"Philipp Salvisberg"},"logo":{"@id":"https:\/\/www.salvis.com\/blog\/wp-content\/uploads\/2010\/11\/phs_trivadis4.jpg"},"sameAs":["http:\/\/www.salvis.com\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/13988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/comments?post=13988"}],"version-history":[{"count":14,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/13988\/revisions"}],"predecessor-version":[{"id":14007,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/posts\/13988\/revisions\/14007"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/media\/14004"}],"wp:attachment":[{"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/media?parent=13988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/categories?post=13988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.salvis.com\/blog\/wp-json\/wp\/v2\/tags?post=13988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}