SQL

SQL, MySQL, Queries, Updates, Transactions, Functions

MySQL Union

by: Matt Hofstetter | March 14 , 2011 | views: 133

A UNION is used to combine the result sets of multiple queries into one result set. The queries that are being combined may come from any table, but must have two similarities in order to be combined. The queries must return the same number of fields. If the number of fields does not match,… view article

MySQL Outer Join, Left Join, Right Join

by: Matt Hofstetter | March 14 , 2011 | views: 207

OUTER JOIN, LEFT JOIN and RIGHT JOIN are used to combine result sets from two queries made to different tables into one result set. This is useful for combining queries where one table may or may not contain a relevant matching record. This example will use the 'world.sql' sample database… view article

MySQL Inner Join

by: Matt Hofstetter | March 14 , 2011 | views: 125

An INNER JOIN is usually used to query the same table twice and join the results as one result set. This example will use the 'world.sql' sample database provided by http:dev.myql.com/doc The 'country' table contains the year of each countries independence, if any. mysql>… view article

Search and Replace with MySQL

by: Matt Hofstetter | February 24 , 2011 | views: 286

When it comes to text manipulation, SQL is lacking.  It offers neither the flexibility of other programming languages (PHP, Java, etc), nor the user-friendliness of a word processor.  Nevertheless, with a little string manipulation creativity, combined with a couple of lesser-know SQL functions, it… view article