4

Basic Statements

In this chapter, we will discuss basic SQL commands for PostgreSQL; these are Data Definition Language (DDL) commands and Data Manipulation Language (DML) commands. In basic terms, DDL commands are used to manage databases and tables, and DML commands are used to insert, delete, update, and select data inside databases. In this chapter, we will also dive into the psql environment. As you learned in Chapter 2, Getting to know your cluster, psql can be described as PostgreSQL’s shell environment; it is the gate we have to go through in order to start writing commands natively in PostgreSQL. We have to remember that psql is always present in any PostgreSQL installation we work with, and it is worth learning since it is such a ...

Get Learn PostgreSQL - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.