The SQL SELECT Statement

The SQL SELECT Statement

Instructor-svgAl-Mamun Sarkar
Apr 14 , 2020

The SQL SELECT Statement. The following SQL Commands are used to run the select query on the database. 

 

Select all Data:

SELECT * FROM tablename;

Example:

SELECT * FROM employees;

 

Select Columns:

SELECT col1, col2, ...
FROM tablename;

 Example:

SELECT name, city 
FROM employees;

 

SELECT DISTINCT:

SELECT DISTINCT column
FROM table_name;

Example:

SELECT DISTINCT country 
FROM employees;

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram