2.1 PostgreSQL SQL Language Introduction

Source: Internet
Author: User
Tags sql tutorial postgresql psql

This chapter provides an overview of how to perform simple operations using SQL. The purpose of this tutorial is simply to give you an introduction, not a complete SQL tutorial. There are many books on SQL, including understanding the New SQL and A Guide to the SQL standard. And you know some of the PostgreSQL language features are extensions to the standard.

In the following example, we assume that you have created a database named MyDB , as described in the previous chapter, and have started the psql.

Examples of this manual can also be found in the src/tutorial/ of the PostgreSQL source code release directory. To use these files, first enter the directory and then run make :

$..../src/tutorial$make

This creates the scripts and compiles a C file that contains user-defined functions and types. If you are installing a pre-packaged (not compiled from source) version, the "Make" section should already be done for you, please refer to the Tutorial directory in the documentation. To start this tutorial, proceed as follows:

$..../tutorial$psql -s mydb...mydb=>\i basics.sql

The \i command reads the command from the specified file. The- s option puts you in single-step mode, which pauses before sending each statement to the server. The commands used in this section are in the basics.sql file.

For more information on PostgreSQL, please refer to http://www.infocool.net/

2.1 PostgreSQL SQL Language Introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.