Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


MySQL SELECT Statement 101

Aug 27, 2010, 19:34 (0 Talkback[s])
(Other stories by Rob Gravelle)

"The SELECT statement is without question the most complex amongst MySQL's data manipulation statements. This article covers the syntax of the SELECT statement, exploring its many optional clauses.

"The SELECT statement is without question the most complex amongst MySQL's data manipulation statements. Not surprising when you consider that the foremost purpose of structured query language (SQL) is to retrieve information from a relational database which adheres to a given criteria. Entire books have been written about how to construct a query to fetch the data that you're after. That's not the purpose of this article. Our goal will be to cover the syntax of the SELECT statement and gain an understanding of its many optional clauses. We'll start at the beginning and work our way through them. When we're done, you'll understand which clauses to use for different purposes. We'll leave the twenty table joins for another day.

"Here's some code to create and populate a couple of tables. If you've been following my data manipulation statements series thus far, you'll recognize them as the same ones that we've used previously."

Complete Story

Related Stories: