SQL Visual QuickStart Guide

  • ISBN13:


  • ISBN10:


  • Edition: 3rd
  • Format: Paperback
  • Copyright: 2008-06-04
  • Publisher: Peachpit Pr
  • Purchase Benefits
  • Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
  • We Buy This Book Back!
    In-Store Credit: $3.68
    Check/Direct Deposit: $3.50
List Price: $49.99 Save up to $7.50
  • Buy New
    Add to Cart Free Shipping


Supplemental Materials

What is included with this book?

  • The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
  • The eBook copy of this book is not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.


Task-based guide delivers the SQL know-how to employ and maintain any SQL-based database.

Author Biography

Chris Fehily is a writer and consultant living in San Francisco. His other books for Peachpit Press include Visual QuickStart Guides to the Python programming language and Windows XP and Vista operating systems

Table of Contents

Introductionp. xi
About SQLp. xii
About This Bookp. xvi
What You'll Needp. xx
DBMS Specificsp. 1
Running SQL Programsp. 2
Microsoft Accessp. 5
Microsoft SQL Serverp. 10
Oraclep. 17
IBM DB2p. 20
MySQLp. 27
PostgreSQLp. 30
The Relational Modelp. 33
Tables, Columns, and Rowsp. 34
Primary Keysp. 38
Foreign Keysp. 40
Relationshipsp. 42
Normalizationp. 45
The Sample Databasep. 51
Creating the Sample Databasep. 57
SQL Basicsp. 61
SQL Syntaxp. 62
SQL Standards and Conformancep. 65
Identifiersp. 66
Data Typesp. 68
Character String Typesp. 70
Binary Large Object Typep. 72
Exact Numeric Typesp. 73
Approximate Numeric Typesp. 75
Boolean Typep. 76
Datetime Typesp. 77
Interval Typesp. 80
Unique Identifiersp. 82
Other Data Typesp. 83
Nullsp. 84
Retrieving Data from a Tablep. 87
Retrieving Columns with SELECT and FROMp. 88
Creating Column Aliases with ASp. 91
Eliminating Duplicate Rows with DISTINCTp. 93
Sorting Rows with ORDER BYp. 95
Filtering Rows with WHEREp. 101
Combining and Negating Conditions with AND, OR, and NOTp. 105
Matching Patterns with LIKEp. 114
Range Filtering with BETWEENp. 118
List Filtering with INp. 121
Testing for Nulls with IS NULLp. 124
Operators and Functionsp. 127
Creating Derived Columnsp. 128
Performing Arithmetic Operationsp. 130
Determining the Order of Evaluationp. 133
Concatenating Strings with [double vertical line]p. 134
Extracting a Substring with SUBSTRING()p. 137
Changing String Case with UPPER() and LOWER()p. 140
Trimming Characters with TRIM()p. 142
Finding the Length of a String with CHARACTER_LENGTH()p. 147
Finding Substrings with POSITION()p. 149
Performing Datetime and Interval Arithmeticp. 152
Getting the Current Date and Timep. 154
Getting User Informationp. 156
Converting Data Types with CAST()p. 157
Evaluating Conditional Values with CASEp. 161
Checking for Nulls with COALESCE()p. 165
Comparing Expressions with NULLIF()p. 166
Summarizing and Grouping Datap. 169
Using Aggregate Functionsp. 170
Creating Aggregate Expressionsp. 171
Finding a Minimum with MIN()p. 172
Finding a Maximum with MAX()p. 173
Calculating a Sum with SUM()p. 174
Calculating an Average with AVG()p. 175
Counting Rows with COUNT()p. 178
Aggregating Distinct Values with DISTINCTp. 179
Grouping Rows with GROUP BYp. 183
Filtering Groups with HAVINGp. 190
Joinsp. 193
Qualifying Column Namesp. 194
Creating Table Aliases with ASp. 196
Using Joinsp. 198
Creating Joins with Join or WHEREp. 200
Creating a Cross Join with CROSS JOINp. 204
Creating a Natural Join with NATURAL JOINp. 206
Creating an Inner Join with INNER JOINp. 210
Creating Outer Joins with OUTER JOINp. 235
Creating a Self-Joinp. 247
Subqueriesp. 253
Understanding Subqueriesp. 254
Subquery Syntaxp. 256
Subqueries vs. Joinsp. 257
Simple and Correlated Subqueriesp. 262
Qualifying Column Names in Subqueriesp. 267
Nulls in Subqueriesp. 268
Using Subqueries as Column Expressionsp. 270
Comparing a Subquery Value by Using a Comparison Operatorp. 275
Testing Set Membership with INp. 281
Comparing All Subquery Values with ALLp. 288
Comparing Some Subquery Values with ANYp. 291
Testing Existence with EXISTSp. 294
Comparing Equivalent Queriesp. 301
Set Operationsp. 303
Combining Rows with UNIONp. 304
Finding Common Rows with INTERSECTp. 310
Finding Different Rows with EXCEPTp. 312
Inserting, Updating, and Deleting Rowsp. 315
Displaying Table Definitionsp. 316
Inserting Rows with INSERTp. 319
Updating Rows with UPDATEp. 327
Deleting Rows with DELETEp. 333
Creating, Altering, and Dropping Tablesp. 337
Creating Tablesp. 338
Understanding Constraintsp. 339
Creating a New Table with CREATE TABLEp. 341
Forbidding Nulls with NOT NULLp. 343
Specifying a Default Value with DEFAULTp. 346
Specifying a Primary Key with PRIMARY KEYp. 350
Specifying a Foreign Key with FOREIGN KEYp. 353
Forcing Unique Values with UNIQUEp. 359
Adding a Check Constraint with CHECKp. 363
Creating a Temporary Table with CREATE TEMPORARY TABLEp. 366
Creating a New Table from an Existing One with CREATE TABLE ASp. 369
Altering a Table with ALTER TABLEp. 373
Dropping a Table with DROP TABLEp. 376
Indexesp. 377
Creating an Index with CREATE INDEXp. 378
Dropping an Index with DROP INDEXp. 383
Viewsp. 385
Creating a View with CREATE VIEWp. 386
Retrieving Data Through a Viewp. 391
Updating Data Through a Viewp. 394
Dropping a View with DROP VIEWp. 398
Transactionsp. 399
Executing a Transactionp. 400
SQL Tricksp. 405
Calculating Running Statisticsp. 406
Generating Sequencesp. 409
Finding Sequences, Runs, and Regionsp. 415
Limiting the Number of Rows Returnedp. 421
Assigning Ranksp. 430
Calculating a Trimmed Meanp. 432
Picking Random Rowsp. 433
Handling Duplicatesp. 435
Creating a Telephone Listp. 438
Retrieving Metadatap. 439
Working with Datesp. 445
Calculating a Medianp. 451
Finding Extreme Valuesp. 453
Changing Running Statistics Midstreamp. 454
Pivoting Resultsp. 456
Working with Hierarchiesp. 458
Indexp. 465
Table of Contents provided by Ingram. All Rights Reserved.

Rewards Program

Write a Review