Field Selection
Anonymous contributor
Anonymous contributor11 total contributions
Anonymous contributor
Published Aug 20, 2024
Contribute to Docs
In PostgreSQL, Field Selection
allows the user to fetch a specific column or field from the database. The SELECT
statement is used with the column name to retrieve the data.
Syntax
SELECT column1, column2, ...
FROM table_name
WHERE condition;
Example
For example, consider this students_marks
table with the following data:
student_id | name | grade |
---|---|---|
1 | Alice | A |
2 | Bob | B |
3 | Charlie | A |
4 | David | C |
5 | Eva | B |
SELECT name from students_marks
The above query will return only the name
column:
name |
---|
Alice |
Bob |
Charlie |
David |
Eva |
All contributors
- Anonymous contributorAnonymous contributor11 total contributions
- Anonymous contributor
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.