Skip to main content
  • 2549 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints 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

Publish with us

Policies and ethics