If, by now, in doing the examples in this chapter, you've received an error when incorrectly typing a column or table name (as is common), it should be obvious that SQL requires that we be syntactically accurate when listing each element of the statement. All clauses, keywords, column names, and table names must be spelled correctly. This can be difficult to do if you don't know what the column names are. Although our SQL Developer tool makes this easy to find, we also have the DESCRIBE
command to display the structure of a table, as shown in the following screenshot:
Executing the command produces three columns of information: the name of the column, whether it allows NULL values, and the datatype of the column. At this point, we will concern ourselves only with the first and third columns. The output shown indicates that our employee_id
column is of type NUMBER(10). We will examine datatypes further in later chapters; but, for now, this...