Home > SQL > SQL – SELECT part I


I’ve been working on the second SQL Course which focus on SELECT statements.

Like a newly built network environment or Active Directory forest, SQL’s day-to-day work is more of a routine work and less of the creative side. SELECT for SQL is like the show command in a Cisco IOS – simple but powerful, flexible and by far the most used command.

Definition: SELECT statement retrieves rows from the database and enables the selection of one or many rows or columns from one or many tables.

The main syntax options for the SELECT statement are:

SELECT select_list [ INTO new_table ]

[ FROM table_source ] [ WHERE search_condition ]

[ GROUP BY group_by_expression ]

[ HAVING search_condition ]

[ ORDER BY order_expression [ ASC | DESC ] ]

FROM is the only mandatory option (you must point the statement to a table). Use the other options at your will to filter the retrieved data and sort it in a user-friendly way.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: