Sunday, January 11, 2015

Explain SELECT Statement by providing examples for the following.

  • Retrieving Individual Columns
  • Retrieving multiple Columns
  • Retrieving ALL Columns
  • Retrieving Distinct Rows
Select statement allows selecting and retrieving data from tables.
Syntax:
Select * | column_name from table name

Retrieving Individual Columns
Select employee_name from employee Where emp_id > 1

Retrieving multiple Columns
Select employee_firstname, employee_lastname from employee Where emp_id > 1

Retrieving ALL Columns
Select * from employee Where emp_id > 1


Retrieving Distinct Rows
Select disctint mobile_number From employee

No comments:

Post a Comment