How to Retrieve Data From From a Single Table in SQL

In this article I am going to explain about how to retrieve data from a single table.
  • 2583

Introduction

In this article I am going to explain about how to retrieve data from a single table. We use SELECT statement to retrieve data from table. There are four clause in SELECT statement which are used to retrieve data from table.

  • SELECT clause is used to describe the column that will be included in the result set.
  • FROM clause is used to names the table from which the query will retrieve the data.
  • WHERE clause is used to specifies the conditions in query.
  • ORDER BY clause is used to specifies how the rows in the result set will be stored.

A Statement that is used to fetch data from invoices table

Clipboard10.jpg

A Statement that is used to fetch data from mcnemp table

Clipboard12.jpg

A Statement that is used to fetch data from mcnemp table with WHERE clause

Clipboard14.jpg

An other Statement that is used to fetch data from mcnemp table with WHERE clause

Clipboard17.jpg

An other Statement that is used to fetch data from mcnemp table with WHERE clause

Clipboard21.jpg

© 2019 DotNetHeaven. All rights reserved.