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.



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:

This would give the following result:

Employee_id First_name
123 Mack
124 Jack
125 King

The above command would display the whole table.

Facebook Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.