Home » Uncategorized

Free Book: SQL Essentials

Update on 5/20/2019: it is no longer a free book, now available on Amazon, here

This book is a guide to using SQL to retrieve data from databases. This site includes a ‘Practice SQL’ environment where you can try out the examples from the book and experiment with SQL queries. This book is available here

Free Book: SQL Essentials

Contents

1. Prerequisites…………..4

2. Instructions…………….4

3. Joining tables………….6

4. SQL ………………………8

5. Single-table operations ……….9

  • Selecting columns..9
  • Selecting rows……12

6. Sorting result tables.14

7. Counting rows………15

8. Summing totals……..16

9. Cartesian Joins………20

10. Retrieving data from multiple tables………..21

11. Distinct values………25

12. Union…………………..27

13. Subqueries……………28

  • Updating data ……….29
  • Inserting records ………..29
  • Updating records ……….29
  • Deleting records ………..30

15. NULL values………..31

16. About the Author…..32

17. Appendix A – Implementation variations……….33

18. Appendix B – Summary of operators………..34

19. Appendix C – Other statements ………..35

20. Appendix D – Test environment ……………36

Leave a Reply

Your email address will not be published. Required fields are marked *