What does the select statement do in SQL?

Sql, Statements

The SELECT statement is used to select data from a database.

Assume you want to find something in a book you have. How would you go about it ?

  1. You would check if what you are searching is in the Index. If you find what you are looking for in the index, you know where to head directly to get what you need.
  2. Its not in the index, you would have to go page by page

Select works in the same fashion.

The SELECT statement is used to select data from a database.This the syntax;

SELECT column_name, column_name
FROM table_name;