Image may be NSFW.
Clik here to view.
Clik here to view.

Description
Updated for the latest database management systems, this introductory guide will get you up and running with SQL quickly. Whether you need to write database applications, perform administrative tasks, or generate reports, Learning SQL, Second Edition, will help you easily master all the SQL fundamentals. Each chapter presents a self-contained lesson on a key SQL concept or technique, with numerous illustrations, annotated examples, and exercises to let you practice the skills you learn.
Updated for the latest database management systems — including MySQL 6.0, Oracle 11g, and Microsoft’s SQL Server 2008 — this introductory guide will get you up and running with SQL quickly. Whether you need to write database applications, perform administrative tasks, or generate reports, Learning SQL, Second Edition, will help you easily master all the SQL fundamentals.Each chapter presents a self-contained lesson on a key SQL concept or technique, with numerous illustrations and annotated examples. Exercises at the end of each chapter let you practice the skills you learn. With this book, you will:
- Move quickly through SQL basics and learn several advanced features
- Use SQL data statements to generate, manipulate, and retrieve data
- Create database objects, such as tables, indexes, and constraints, using SQL schema statements
- Learn how data sets interact with queries, and understand the importance of subqueries
- Convert and manipulate data with SQL’s built-in functions, and use conditional logic in data statements
Knowledge of SQL is a must for interacting with data. With Learning SQL, you’ll quickly learn how to put the power and flexibility of this language to work.
Table of Contents
-
Chapter 1 A Little Background
-
Introduction to Databases
-
What Is SQL?
-
What Is MySQL?
-
What’s in Store
-
-
Chapter 2 Creating and Populating a Database
-
Creating a MySQL Database
-
Using the mysql Command-Line Tool
-
MySQL Data Types
-
Table Creation
-
Populating and Modifying Tables
-
When Good Statements Go Bad
-
The Bank Schema
-
-
Chapter 3 Query Primer
-
Query Mechanics
-
Query Clauses
-
The select Clause
-
The from Clause
-
The where Clause
-
The group by and having Clauses
-
The order by Clause
-
Test Your Knowledge
-
-
Chapter 4 Filtering
-
Condition Evaluation
-
Building a Condition
-
Condition Types
-
Null: That Four-Letter Word
-
Test Your Knowledge
-
-
Chapter 5 Querying Multiple Tables
-
What Is a Join?
-
Joining Three or More Tables
-
Self-Joins
-
Equi-Joins Versus Non-Equi-Joins
-
Join Conditions Versus Filter Conditions
-
Test Your Knowledge
-
-
Chapter 6 Working with Sets
-
Set Theory Primer
-
Set Theory in Practice
-
Set Operators
-
Set Operation Rules
-
Test Your Knowledge
-
-
Chapter 7 Data Generation, Conversion, and Manipulation
-
Working with String Data
-
Working with Numeric Data
-
Working with Temporal Data
-
Conversion Functions
-
Test Your Knowledge
-
-
Chapter 8 Grouping and Aggregates
-
Grouping Concepts
-
Aggregate Functions
-
Generating Groups
-
Group Filter Conditions
-
Test Your Knowledge
-
-
Chapter 9 Subqueries
-
What Is a Subquery?
-
Subquery Types
-
Noncorrelated Subqueries
-
Correlated Subqueries
-
When to Use Subqueries
-
Subquery Wrap-up
-
Test Your Knowledge
-
-
Chapter 10 Joins Revisited
-
Outer Joins
-
Cross Joins
-
Natural Joins
-
Test Your Knowledge
-
-
Chapter 11 Conditional Logic
-
What Is Conditional Logic?
-
The Case Expression
-
Case Expression Examples
-
Test Your Knowledge
-
-
Chapter 12 Transactions
-
Multiuser Databases
-
What Is a Transaction?
-
Test Your Knowledge
-
-
Chapter 13 Indexes and Constraints
-
Indexes
-
Constraints
-
Test Your Knowledge
-
-
Chapter 14 Views
-
What Are Views?
-
Why Use Views?
-
Updatable Views
-
Test Your Knowledge
-
-
Chapter 15 Metadata
-
Data About Data
-
Information_Schema
-
Working with Metadata
-
Test Your Knowledge
-