SQL: The Complete Reference

[amazon 0071592555 mediumimage]

People ask me which book to buy for SQL. My recommendation is SQL: The Complete Reference by James R. Groff, Paul N. Weinburg, and Andrew J. Oppel, now in the third edition.

When you are writing commercial code, you need to know how to write database transactions and you need to know the variations in SQL for several databases. SQL: The Complete Reference covers those extra details.

MySQL and PostgreSQL are the main open source databases. Oracle, Microsoft SQL Server, and IBM's DB2 are the most common commercial databases. Practice with MySQL then PostgreSQL then tackle Oracle.

Read more about SQL in SQL.

Recommendation

Start with PHP, the Apache Web server, and the MySQL database. As soon as you have your Web site running reliably with MySQL, buy SQL: The Complete Reference, set up the sample databases and practice with SQL Server then Oracle.