Summary
This has been a fairly long chapter, but we have covered quite a lot. We have discussed the SELECT statement in some detail, discovering how to choose columns and rows, how to order the output, and how to suppress duplicate information. We also learned a bit about the date type, and how to configure PostgreSQL’s behavior in interpreting and displaying dates, as well as how to use dates in condition statements.
We then moved on to the heart of SQL: the ability to relate tables together. After our first bit of SQL that joined a pair of tables, we saw how easy it was to extend this to three and even four tables. We finished off by reusing some of the knowledge we gained early in the chapter to refine our four-table selection to home in on displaying exactly the information we were searching for, and removing all the extra columns and duplicate rows.
The good news is that we have now seen all the everyday features of the SELECT statement, and once you understand the SELECT statement, much of the rest of SQL is reasonably straightforward. We will be coming back to the SELECT statement in Chapter 7 to look at some more advanced features that you will need from time to time, but you will find that much of SQL you need to use in the real world has been covered in this chapter.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2005 Neil Matthew and Richard Stones
About this chapter
Cite this chapter
(2005). Accessing Your Data. In: Beginning Databases with PostgreSQL. Apress. https://doi.org/10.1007/978-1-4302-0018-5_4
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0018-5_4
Publisher Name: Apress
Print ISBN: 978-1-59059-478-0
Online ISBN: 978-1-4302-0018-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books