One of the things that people get confused with, and don't understand as a "complete language" is SQL. The "structured query language" is, in fact, a full language - and this article from Builder.com confirms that fact.
Many developers view SQL as an afterthought — a relatively easy syntax for accessing data. These novices usually access relational data by way of Open Database Connectivity (ODBC), Java Database Connectivity (JDBC), or a native driver. They are blind to the power of SQL.
So many people don't take the time to work their SQL into what they should, just using "select *" all over the place, or having a bad database structure (which is a whole different topic). Most people just use the basic functionality for their queries, never getting into the more advanced control structures that SQL supports. This article gives a prime example of that kind of query. So, next time you're worried about making your PHP work around a result set from MySQL or Oracle, keep in mind that maybe it's not your PHP that needs to change....




