In the following SQL query why do they have an independent letter then period then the table name? I seemed to have missed something in the reading and cannot find it for the life of me

SELECT D.DNAME, E.ENAME
FROM DEPT D LEFT OUTER JOIN EMP E
ON D.DEPTNO = E.DEPTNO
ORDER BY D.DNAME;

In SQL, it is common practice to use table aliases to make the SQL queries more readable.

In the given SQL query, the letters "D" and "E" followed by periods are table aliases. They are used as shorthand references to the table names "DEPT" and "EMP" respectively.

Table aliases are helpful in cases where the table names are long or when you need to join the same table multiple times in a query. By using aliases, you can write a more concise and readable query.

To understand this query, here is a breakdown of each line:

1. `SELECT D.DNAME, E.ENAME`: This part of the query specifies the columns to be selected. In this case, it selects the "DNAME" column from the "DEPT" table (using the "D" table alias) and the "ENAME" column from the "EMP" table (using the "E" table alias).

2. `FROM DEPT D LEFT OUTER JOIN EMP E`: This part specifies the tables used in the query. The table "DEPT" is assigned the alias "D" and the table "EMP" is assigned the alias "E". The "LEFT OUTER JOIN" keyword is used to combine the records from the "DEPT" table with the matching records from the "EMP" table based on the "DEPTNO" column.

3. `ON D.DEPTNO = E.DEPTNO`: This line specifies the join condition. It indicates that the join should be performed based on the "DEPTNO" column, which exists in both the "DEPT" table and the "EMP" table.

4. `ORDER BY D.DNAME`: This line specifies the sorting order of the result set. It sorts the result set in ascending order based on the "DNAME" column from the "DEPT" table.

Overall, the table aliases ("D" and "E") help make the query more concise and readable by providing shorthand references to the table names.