Archive of SQL examples
  SQL simple SQL advanced TSQL Spatial SQL MySQL/PHP Links
Welcome to my archive of SQL examples.

SQL (Structured Query Language) is a widely used language for quering relational databases. The code in this archive deals with real life tasks like generating sales statistics, calculating next birthday of employee and so on, using Transact-SQL, MySQL and Jet-SQL syntax. One section of the archive is devoted to Simple SQL Queries sutable for beginners, others are adressing specific issues including procedures syntax, functions, Spatial Queries and client scripting like ASP. Some of the scripts reference the "Colombo Ltd" database. This is a sample database with some business data in it. As for the standards, most of the features discussed are part of the SQL-89, SQL-92 specifications and few are from those introduced in SQL-99.

Latest Adds:

   Identify and Remove Duplicate records
Using ROW_NUMBER() function with PARTITION BY
Backup SQL server database using TSQL script
MSSQL-Spatial. Split Polylines to simple lines
Procedure that splits character string to words
UDF Min/Max value function in MS-Access SQL
Calculated column in SQL Server (2005 or Later)

This archive includes more than 190 sql examples (and solutions) usefull for learning sql programming technique, but is not a systematic SQL tutorial. If you need one, go to: www.w3schools.com/sql Or: www.1keydata.com/sql/sql.html.

/*
  
Be aware of making proper checks when using the scripts and samples from this site, cause I do not warrant their correctness.
*/

Have a :) time!

amper102[at]hotmail.com