SQL - SELECT Database

When you have multiple databases in your SQL Schema, then before starting your operation, you would need to select a database where all the operations would be performed.

If you want to retrieve information from specified column or all columns from a table, use SQL SELECT query.

The basic syntax of SQL SELECT statement is given below:

  1. SELECT column_list FROM table_name
  2. [WHERE Clause]
  3. [GROUP BY Clause]
  4. [HAVING Clause]
  5. [ORDER BY Clause];

Example select statement

SELECT firstname,lastname,salary FROM emp;