Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover Page
About This eBook
Title Page
Copyright Page
Contents at a Glance
Table of Contents
About the Author
Acknowledgments
We Want to Hear from You!
Reader Services
Introduction
Who Is the Teach Yourself SQL Book For?
DBMSs Covered in This Book
Conventions Used in This Book
Lesson 1. Understanding SQL
Database Basics
What Is SQL?
Try It Yourself
Summary
Lesson 2. Retrieving Data
The SELECT Statement
Retrieving Individual Columns
Retrieving Multiple Columns
Retrieving All Columns
Retrieving Distinct Rows
Limiting Results
Using Comments
Summary
Challenges
Lesson 3. Sorting Retrieved Data
Sorting Data
Sorting by Multiple Columns
Sorting by Column Position
Specifying Sort Direction
Summary
Challenges
Lesson 4. Filtering Data
Using the WHERE Clause
The WHERE Clause Operators
Summary
Challenges
Lesson 5. Advanced Data Filtering
Combining WHERE Clauses
Using the IN Operator
Using the NOT Operator
Summary
Challenges
Lesson 6. Using Wildcard Filtering
Using the LIKE Operator
Tips for Using Wildcards
Summary
Challenges
Lesson 7. Creating Calculated Fields
Understanding Calculated Fields
Concatenating Fields
Performing Mathematical Calculations
Summary
Challenges
Lesson 8. Using Data Manipulation Functions
Understanding Functions
Using Functions
Summary
Challenges
Lesson 9. Summarizing Data
Using Aggregate Functions
Aggregates on Distinct Values
Combining Aggregate Functions
Summary
Challenges
Lesson 10. Grouping Data
Understanding Data Grouping
Creating Groups
Filtering Groups
Grouping and Sorting
SELECT Clause Ordering
Summary
Challenges
Lesson 11. Working with Subqueries
Understanding Subqueries
Filtering by Subquery
Using Subqueries as Calculated Fields
Summary
Challenges
Lesson 12. Joining Tables
Understanding Joins
Creating a Join
Summary
Challenges
Lesson 13. Creating Advanced Joins
Using Table Aliases
Using Different Join Types
Using Joins with Aggregate Functions
Using Joins and Join Conditions
Summary
Challenges
Lesson 14. Combining Queries
Understanding Combined Queries
Creating Combined Queries
Summary
Challenges
Lesson 15. Inserting Data
Understanding Data Insertion
Copying from One Table to Another
Summary
Challenges
Lesson 16. Updating and Deleting Data
Updating Data
Deleting Data
Guidelines for Updating and Deleting Data
Summary
Challenges
Lesson 17. Creating and Manipulating Tables
Creating Tables
Updating Tables
Deleting Tables
Renaming Tables
Summary
Challenges
Lesson 18. Using Views
Understanding Views
Creating Views
Summary
Challenges
Lesson 19. Working with Stored Procedures
Understanding Stored Procedures
Understanding Why to Use Stored Procedures
Executing Stored Procedures
Creating Stored Procedures
Summary
Lesson 20. Managing Transaction Processing
Understanding Transaction Processing
Controlling Transactions
Summary
Lesson 21. Using Cursors
Understanding Cursors
Working with Cursors
Summary
Lesson 22. Understanding Advanced SQL Features
Understanding Constraints
Understanding Indexes
Understanding Triggers
Database Security
Summary
Appendix A. Sample Table Scripts
Understanding the Sample Tables
Obtaining the Sample Tables
Appendix B. SQL Statement Syntax
ALTER TABLE
COMMIT
CREATE INDEX
CREATE PROCEDURE
CREATE TABLE
CREATE VIEW
DELETE
DROP
INSERT
INSERT SELECT
ROLLBACK
SELECT
UPDATE
Appendix C. Using SQL Datatypes
String Datatypes
Numeric Datatypes
Date and Time Datatypes
Binary Datatypes
Appendix D. SQL Reserved Words
Index
Code Snippets
← Prev
Back
Next →
← Prev
Back
Next →