Free Source Code and Tutorials

Custom Search

SQL SELECT Statement


The SELECT statement tells what is to be returned. ‘*’means all the columns from all tables in the from statement are to be returned.




  1. SELECT <field1>,<field2>
  2. FROM <table_name>;


For example, we have this table Employee:

Employee_id First_name Last_name sex
123 Mack Johnson male
124 Jack Obama male
125 King Khan male


Now, we want to select two columns Employee_id and First_name:


  1. SELECT Employee_id,First_name FROM Employee;


This would give the following result:

Employee_id First_name
123 Mack
124 Jack
125 King


  1. SELECT * FROM Employee;

The above command would display the whole table.

Facebook Comments
(Visited 2 times, 1 visits today)
Share this

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked * © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!

%d bloggers like this: