4.PracticalSQL2E_SampleCh3 - Copy
4.PracticalSQL2E_SampleCh3 - Copy
expect, which is a task well suited to SELECT. Are dates in a proper format
complete with month, date, and year, or are they entered (as I once ruefully
observed) as text with the month and year only? Does every row have values
in all the columns? Are there mysteriously no last names starting with let-
ters beyond M? All these issues indicate potential hazards ranging from
missing data to shoddy record keeping somewhere in the workflow.
We’re only working with a table of six rows, but when you’re facing a
table of thousands or even millions of rows, it’s essential to get a quick read
on your data quality and the range of values it contains. To do this, let’s dig
deeper and add several SQL keywords.
NOTE pgAdmin allows you to drag and drop column names, table names, and other objects
from the object browser into the Query Tool. This can be helpful if you’re writing a
new query and don’t want to keep typing lengthy object names. Expand the object tree
to find your tables or columns, as you did in Chapter 1, and click and drag them into
the Query Tool.
4 Chapter 3