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 powerful environment in which to manage our data and our databases.
Basic statements and psql
are therefore the foundations on which we will build our knowledge of PostgreSQL. Therefore, reading and understanding this chapter is essential...