Part II. The SQL Language
This part describes the use of theSQL language inPostgreSQL. We start with describing the general syntax ofSQL, then how to create tables, how to populate the database, and how to query it. The middle part lists the available data types and functions for use inSQL commands. Lastly, we address several aspects of importance for tuning a database. The information is arranged so that a novice user can follow it from start to end and gain a full understanding of the topics without having to refer forward too many times. The chapters are intended to be self-contained, so that advanced users can read the chapters individually as they choose. The information is presented in narrative form with topical units. Readers looking for a complete description of a particular command are encouraged to review thePart VI. Readers should know how to connect to aPostgreSQL database and issueSQL commands. Readers that are unfamiliar with these issues are encouraged to readPart I first.SQL commands are typically entered using thePostgreSQL interactive terminalpsql, but other programs that have similar functionality can be used as well. Table of Contentspg_lsn
TypeORDER BY