PostgreSQL SELECT Query
In PostgreSQL, the SELECT statement is used to retrieve data from a database table. Data is returned in the form of result table. These result tables are called result-sets.
Here, column1, column2,?..columnN specifies the columns from where you retrieve the data. If you want to retrieve all the fields from the table then you have to use the following syntax:
See this example:
Let's take a table "EMPLOYEES".
The above table "EMPLOYEES" has the following records:
Follow the steps given below to select a table
Consider that we have to retrieve only "ID" "NAME" and "SALARY" from the table.
Execute the following query:
Execute the following query to retrieve all fields from the table:
Both will give you the same result: