SQL Fundamentals, Third Edition

Book description

SQL for the Real World

Don’t just learn “generic” SQL. Learn SQL to get results with the world’s top database platforms–Oracle for the enterprise and Microsoft Access for the desktop. Based on John Patrick’s hands-on SQL course at the University of California, Berkeley Extension, this book shows exactly how to retrieve the data you want, when you need it, in any application–from ad hoc reports to the data warehouse. Thoroughly updated for the newest versions of Oracle, Access, and the SQL standard, this book contains more exercises, techniques, and solutions than ever before. You’ll learn exactly how to write SQL queries that are easy to understand, verify, modify, and extend–even if you’ve never worked with databases before.

SQL Fundamentals,Third Edition, teaches you how to

  • Build simple statements to retrieve, store, or modify data

  • Craft complex queries that draw information from multiple tables

  • Sort and summarize your data just the way you want it

  • Create and edit your own tables

  • Protect the integrity of your data

  • Create more efficient, high-performance queries

  • Work with unions, subqueries, self joins, cross joins, inner joins, and outer joins

  • Use the Oracle Data Dictionary

About the Web Site

The accompanying Web site, https://www.box.com/shared/ylbckg2fn0 , contains all the SQL code and tables from the book, including the full databases for several versions of Access and code for building the corresponding Oracle databases. It also provides solutions to many of the book’s problems and an open area for discussions with the author and other readers.

Table of contents

  1. Copyright
    1. Dedication
  2. Preface
    1. How the Topics Are Presented
    2. The Companion Web Site
    3. Acknowledgments
  3. 1. Storing Information in Tables
    1. Introduction
      1. 1-1. What is SQL?
        1. Notes about SQL
      2. 1-2. What is a relational database and why would you use one?
        1. The beginning of relational databases
        2. Today — How relational databases have changed
      3. 1-3. Why learn SQL?
      4. 1-4. What is in this book?
        1. The subject of this book
        2. Who should read this book?
        3. Organization of this book
        4. Why compare two different implementations of SQL — Oracle and Access?
    2. The Parts of a Table
      1. 1-5. Data is stored in tables
      2. 1-6. A row represents an object and the information about it
      3. 1-7. A column represents one type of information
      4. 1-8. A cell is the smallest part of a table
      5. 1-9. Each cell should express just one thing
      6. 1-10. Primary key columns identify each row
      7. 1-11. Most tables are tall and thin
    3. Examples of Tables
      1. 1-12. An example of a table in Oracle and Access
        1. Similarities between Oracle and Access
        2. Differences between Oracle and Access
      2. 1-13. Some design decisions in the l_employees table
        1. Design decisions to be aware of
      3. 1-14. The Lunches database
        1. Challenging features of the Lunches database
    4. Key Points
  4. 2. Getting Information from a Table
    1. The Select Statement
      1. 2-1. The goal: Get a few columns and rows from a table
        1. Handling small tables of data
      2. 2-2. Overview of the select statement
    2. The Select Clause
      1. 2-3. Overview of the select clause
      2. 2-4. Use a select clause to get a list of some of the columns
      3. 2-5. Use a select clause to get a list of all of the columns
        1. Displaying the data in any table
      4. 2-6. Use a select clause to get the distinct values in one column
        1. Where nulls are placed in the sort order — A difference between Oracle and Access
      5. 2-7. Use a select clause to get the distinct values in two columns
        1. What it means to eliminate duplicate rows from the result
    3. The Where Clause
      1. 2-8. Overview of the where clause
      2. 2-9. Using an Equal condition in the where clause
      3. 2-10. Using a Less Than condition in the where clause
      4. 2-11. Using a Not Equal condition in the where clause
        1. Variations
        2. SQL uses three-valued logic
      5. 2-12. Using the in condition in the where clause
      6. 2-13. Using the between condition in the where clause
        1. Notes on the dates in this variation
      7. 2-14. Using the like condition in the where clause
      8. 2-15. Using the is null condition in the where clause
        1. Why databases use nulls
    4. The Order By Clause
      1. 2-16. Overview of the order by clause
        1. Syntax of the order by clause
        2. Sort order options for each column
        3. Examples of an order by clause
      2. 2-17. Sorting the rows by one column in ascending order
      3. 2-18. Sorting the rows by several columns in ascending order
      4. 2-19. Sorting the rows by several columns in various orders
      5. 2-20. The whole process so far
    5. Key Points
  5. 3. Compound Conditions in the Where Clause
    1. Compound Conditions in the Where Clause
      1. 3-1. Using a compound condition in the where clause
      2. 3-2. Using not with in, between, like, and is null
      3. 3-3. The standard form of a complex condition in the where clause
      4. 3-4. A common mistake
    2. Constant Values
      1. 3-5. Using a constant value in the select clause
      2. 3-6. Using a table of constants
    3. Punctuation Matters
      1. 3-7. Punctuation you need to know right now
        1. Spaces in names — Avoid them when you can
        2. Commas
        3. Single quotes
        4. Double quotes
        5. Pound signs
        6. Semicolons
        7. Reserved words — Avoid them
      2. 3-8. Punctuation reference section
        1. How to avoid having spaces in names
        2. How to handle spaces in names
        3. Commas
        4. Single quotes
        5. Double quotes
        6. Apostrophes
        7. Pound signs
        8. SQL can be written in free format
        9. Double dashes (comment line)
        10. Periods and exclamation marks
        11. Ampersands
        12. Vertical bars
        13. Semicolons
        14. Colons
        15. Numbers — Commas, decimal points, and dollar signs
        16. Square brackets
        17. Asterisks
        18. Forward slashes
        19. Multiline comments
        20. Not Equal conditions
        21. Wildcards
        22. Regular expressions
    4. Case Sensitivity
      1. 3-9. Case sensitivity in Oracle
      2. 3-10. The debate about case sensitivity in SQL
      3. 3-11. You have a choice
      4. 3-12. You can turn off case sensitivity in the Oracle SQL Command Line environment
      5. 3-13. Case sensitivity in Access
    5. Three-Valued Logic
      1. 3-14. SQL uses three-valued logic
    6. Error Messages
      1. 3-15. Error messages are often wrong
    7. Some Exercises Solved for You
      1. 3-16. Exercise 1
      2. 3-17. Exercise 2
      3. 3-18. Exercise 3
    8. Key Points
  6. 4. Saving Your Results
    1. Saving Your Results in a New Table or View
      1. 4-1. Create a new table from the result of a select statement
        1. Description of the process
      2. 4-2. Creating a new view from the results of a select statement
        1. Description of the process
      3. 4-3. Similarities between tables and views
      4. 4-4. Differences between tables and views
        1. Should you use a table or a view?
      5. 4-5. Deleting a table
      6. 4-6. Deleting a view
      7. 4-7. One view can be built on top of another view
        1. There are layers of views
        2. What happens when an underlying base table or view is deleted?
        3. An example of building one view on top of another view
      8. 4-8. Preventative delete
        1. Coding a preventative delete
    2. Modifying the Data in a Table with SQL
      1. 4-9. Adding one new row to a table
      2. 4-10. Adding many new rows to a table
      3. 4-11. Changing data in the rows already in a table
      4. 4-12. Deleting rows from a table
    3. Modifying the Data in a Table with the GUI
      1. 4-13. Using the Oracle GUI to change data in a table
        1. Adding a new row
        2. Changing the data in a row already in the table
        3. Deleting a row
      2. 4-14. Using the Access GUI to change the data in a table
        1. Adding a new row
        2. Changing the data in a row already in the table
        3. Deleting a row
    4. Restrictions on Modifying the Data in a Table
      1. 4-15. Constraints with insert, update, and delete
      2. 4-16. Security restrictions
    5. Key Points
  7. 5. The Data Dictionary and Other Oracle Topics
    1. Commit, Rollback, and Transactions
      1. 5-1. The commit and rollback commands
      2. 5-2. The Autocommit option
      3. 5-3. Transactions
        1. Transactions are important
    2. Modifying Data through a View
      1. 5-4. Changing data through a view
      2. 5-5. Example of changing data through a view
        1. The components of the process in the conceptual diagram
      3. 5-6. Views using With Check Option
    3. The SQL Commands Page in Oracle
      1. 5-7. Overview of the SQL Commands page
      2. 5-8. The Autocommit option
      3. 5-9. The Explain option
    4. Using the Oracle Data Dictionary — Part 1
      1. 5-10. Overview of the Data Dictionary
        1. Oracle Data Dictionary
        2. Access uses the GUI to show this information
      2. 5-11. How to find the names of all the tables
      3. 5-12. How to find the names of all the views
      4. 5-13. How to find the select statement that defines a view
      5. 5-14. How to find the names of the columns in a table or view
      6. 5-15. How to find the primary key of a table
    5. Key Points
  8. 6. Creating Your Own Tables
    1. Creating Tables
      1. 6-1. The create table command
      2. 6-2. Datatypes in Oracle and Access
      3. 6-3. Text datatypes
        1. Variable length strings
        2. Fixed length strings
        3. Long strings
      4. 6-4. Numeric datatypes
      5. 6-5. Date/time datatypes
      6. 6-6. Other datatypes
      7. 6-7. Putting data into a new table
      8. 6-8. Creating the l_employees table in Oracle
    2. Changing Tables
      1. 6-9. Adding a primary key to a table
      2. 6-10. Changing the primary key of a table
      3. 6-11. Adding a new column to a table
      4. 6-12. Expanding the length of a column
      5. 6-13. Deleting a column from a table
      6. 6-14. Making other changes to tables
    3. Tables with Duplicate Rows
      1. 6-15. The problem with duplicate rows
        1. When to avoid duplicate rows
        2. When to allow duplicate rows
        3. Why duplicate rows are allowed in tables
        4. Example of duplicate rows that represent separate objects
        5. Example of duplicate rows that represent the same object
      2. 6-16. How to eliminate duplicate rows
      3. 6-17. How to distinguish between duplicate rows
    4. Key Points
  9. 7. Formats, Sequences, and Indexes
    1. Formats
      1. 7-1. Formats of dates
      2. 7-2. Displaying formatted dates
      3. 7-3. Entering formatted dates
      4. 7-4. Other formats in Oracle
      5. 7-5. Formats in Access
    2. Sequences
      1. 7-6. Creating a sequence in Oracle
      2. 7-7. Using sequences in Oracle
      3. 7-8. Sequences in Access
    3. Indexes
      1. 7-9. Creating an index
      2. 7-10. The Optimizer
      3. 7-11. An example of how an index works
    4. Using the Oracle Data Dictionary — Part 2
      1. 7-12. How to find information about the datatype of a column
      2. 7-13. How to find information about sequences
      3. 7-14. How to find information about indexes
      4. 7-15. How to find information about all your database objects
      5. 7-16. How to use the index of Data Dictionary tables
      6. 7-17. How to use the index of Data Dictionary columns
    5. An Exercise Solved for You
      1. 7-18. Create a table of the days you want to celebrate
    6. Key Points
  10. 8. Data Integrity
    1. Constraints on One Table
      1. 8-1. A constraint keeps the data consistent
      2. 8-2. check constraints
      3. 8-3. unique constraints
      4. 8-4. not null constraints
      5. 8-5. primary key constraints
      6. 8-6. Restrictions on the datatype and length of fields
    2. Referential Integrity
      1. 8-7. The concept of RI
      2. 8-8. An example of RI
      3. 8-9. Inserts and updates to the data table prevented by RI
      4. 8-10. Inserts and updates to the data table allowed by RI
      5. 8-11. Updates and deletes to the lookup table prevented by RI
      6. 8-12. How to delete a code from the lookup table
      7. 8-13. How to change a code in the lookup table
      8. 8-14. RI as a relationship between the tables
      9. 8-15. Setting up RI in the Access GUI
    3. The Delete Options and Update Options of RI
      1. 8-16. The three options for deletes and updates to the lookup table
        1. Delete options
        2. Update options
      2. 8-17. set null
      3. 8-18. cascade
      4. 8-19. The update rule: cascade
    4. Variations of Referential Integrity
      1. 8-20. The two meanings of primary key
      2. 8-21. Using two or more columns for the primary key
      3. 8-22. The lookup and data tables can be the same table
    5. How to Code Constraints in a Create Table Statement
      1. 8-23. Constraints are often coded in the create table statement
    6. Key Points
  11. 9. Row Functions
    1. Introduction to Row Functions
      1. 9-1. Getting data directly from the beginning table
      2. 9-2. What is a row function?
      3. 9-3. An example of a row function in the select clause
      4. 9-4. An example of a row function used in all the clauses of a select statement
      5. 9-5. Defining a row function as the first step
    2. Numeric Functions
      1. 9-6. Functions on numbers
      2. 9-7. How to test a row function
      3. 9-8. Another way to test a numeric row function
    3. Text Functions
      1. 9-9. Functions on text
      2. 9-10. Combining the first and last names
      3. 9-11. Separating the first and last names
      4. 9-12. Formatting phone numbers
    4. Date Functions
      1. 9-13. Functions on dates
      2. 9-14. An example of a date function
      3. 9-15. Removing the time from a date
    5. Key Points
  12. 10. Using Row Functions
    1. Specialized Row Functions
      1. 10-1. Other row functions
      2. 10-2. Using a function to identify the user and the date
      3. 10-3. Using a function to change nulls to other values
      4. 10-4. Using a function to change the datatype
    2. Using the Documentation of Row Functions
      1. 10-5. Using Oracle documentation
      2. 10-6. Using Access documentation
      3. 10-7. Using the Access Expression Builder to find row functions
    3. Creating Patterns of Numbers and Dates
      1. 10-8. Create a simple pattern of numbers
      2. 10-9. Create a complex pattern of numbers
      3. 10-10. List all the days of one week
      4. 10-11. Create a calendar of workdays
      5. 10-12. How to find out how many days old you are
      6. 10-13. How to find the date when you will be 10,000 days old
      7. 10-14. Numbering the lines of a report in Oracle and Access
        1. The Oracle method
        2. The Access method
      8. 10-15. Optional: An easy way to solve an algebraic equation
    4. Key Points
  13. 11. Summarizing Data
    1. Introduction to the Column Functions
      1. 11-1. Summarizing all the data in a column
      2. 11-2. A list of the column functions
        1. Nulls are ignored by all the column functions except one
    2. Maximum and Minimum
      1. 11-3. Finding the maximum and minimum values
        1. Nulls and column functions
      2. 11-4. Using a where clause with a column function
      3. 11-5. Finding the rows that have the maximum or minimum value
    3. Count
      1. 11-6. Counting rows and counting data
        1. Counting all the rows in a table
        2. Counting all the values in a column, excluding nulls
      2. 11-7. Counting to zero, part 1
      3. 11-8. Counting the number of distinct values in a column
      4. 11-9. Counting the number of distinct values in two or more columns
    4. Sum and Average
      1. 11-10. The sum and average functions
      2. 11-11. The problem with nulls in addition and how to solve it
        1. The solution
    5. Other Topics
      1. 11-12. Nulls are not always changed to zero
      2. 11-13. Counting the number of nulls in a column
      3. 11-14. Counting distinct dates
    6. Key Points
  14. 12. Controlling the Level of Summarization
    1. Dividing a Table into Groups of Rows
      1. 12-1. Summary of groups of data within a column
      2. 12-2. The group by clause
      3. 12-3. Groups formed on two or more columns
      4. 12-4. Null groups when there are two or more grouping columns
      5. 12-5. Summarized data cannot be mixed with nonsummarized data in the same select statement
        1. Error messages
        2. How to solve the problem
      6. 12-6. Solution 1: Add more columns to the group by clause
      7. 12-7. Solution 2: Divide the query into two separate select statements
      8. 12-8. How to create a report with subtotals and a grand total
        1. Oracle has some special features for totals and subtotals
      9. 12-9. Counting to zero, part 2
      10. 12-10. Counting to zero, part 3
    2. Eliminating Some of the Summarized Data
      1. 12-11. The having clause
      2. 12-12. The having clause contrasted with the where clause
      3. 12-13. The whole process of the select statement on a single table
      4. 12-14. The having clause does not add any more power to the select statement
      5. 12-15. Use a where clause to eliminate raw data
      6. 12-16. How to apply one column function to another column function and get around other restrictions
        1. How to work around other restrictions on column functions
    3. Key Points
  15. 13. Inner Joins
    1. Introduction to Joins
      1. 13-1. A query can use data from several tables
      2. 13-2. The best approach is to join two tables at a time
    2. Inner Joins of Two Tables
      1. 13-3. A one-to-one relationship
        1. The Data
        2. The SQL for this inner join
        3. Two definitions of a one-to-one relationship — A sad story
      2. 13-4. A many-to-one relationship
      3. 13-5. A one-to-many relationship
      4. 13-6. A many-to-many relationship
      5. 13-7. Unmatched rows are dropped
      6. 13-8. Rows with a null in the matching column are dropped
      7. 13-9. Five ways to write the SQL for an inner join
    3. Variations of the Join Condition
      1. 13-10. A join using two or more matching columns
      2. 13-11. A join using between to match on a range of values
      3. 13-12. A join using the Greater Than condition
      4. 13-13. A join using a row function
      5. 13-14. Writing the join condition in the from clause
    4. Applications of Joins
      1. 13-15. Lookup tables
        1. Inner joins and lookup tables
      2. 13-16. Combining a join and selection of data
      3. 13-17. Using a join with summarization
      4. 13-18. How to find the primary key in the Oracle Data Dictionary
      5. 13-19. Combining three or more tables with inner joins
    5. Key Points
  16. 14. Outer Joins
    1. Introduction to Outer Joins
      1. 14-1. Outer joins are derived from inner joins
      2. 14-2. The three types of outer joins
      3. 14-3. The left outer join
      4. 14-4. The right outer join
      5. 14-5. The full outer join
      6. 14-6. An introduction to the union
      7. 14-7. An example of a union of two tables with matching columns
    2. Applications of Outer Joins
      1. 14-8. Counting to zero, part 4
      2. 14-9. Combining an outer join with a selection of the data
      3. 14-10. A full outer join in sorted order
      4. 14-11. Finding the defects in a pattern
      5. 14-12. Comparing tables using two or more columns
      6. 14-13. Comparing two different full outer joins
        1. Similarities between the two full outer joins
        2. Differences between the two full outer joins
      7. 14-14. Problem: Left and right outer joins can be difficult to handle
    3. Key Points
  17. 15. Union and Union All
    1. Union Basics
      1. 15-1. The difference between a union and a join
      2. 15-2. The difference between a union and a union all
      3. 15-3. The select statements within a union
      4. 15-4. The order by clause in a union
      5. 15-5. Creating a table or view that includes a union
      6. 15-6. Automatic datatype conversion in a union
        1. Text columns
        2. Numeric columns
        3. Date columns
        4. Compatibility of columns
    2. Unconventional Unions
      1. 15-7. A union of tables with different datatypes
      2. 15-8. A union of two tables with different numbers of columns
    3. Applications of a Union
      1. 15-9. Determining if two tables are identical
      2. 15-10. Using a literal in a union to identify the source of the data
      3. 15-11. Attaching messages to flag exceptions, warnings, and errors
      4. 15-12. Dividing data from one column into two different columns
      5. 15-13. Applying two functions to different parts of the data
      6. 15-14. A union of three or more tables
    4. Set Intersection and Set Difference in Oracle
      1. 15-15. Set intersection
      2. 15-16. Set difference
    5. Key Points
  18. 16. Cross Joins, Self Joins, and CrossTab Queries
    1. Cross Joins
      1. 16-1. Definition of a cross join
      2. 16-2. Why are cross joins important?
      3. 16-3. An inner join is derived from a cross join
      4. 16-4. The properties of an inner join
      5. 16-5. An error in the join condition can appear to be a cross join
      6. 16-6. Using a cross join to list all the possible combinations
      7. 16-7. Other layouts when there are three or more dimensions
        1. Layout 1: Several two-dimensional tables
        2. Layout 2: One table
      8. 16-8. Avoid a cross join of large tables
    2. Self Joins
      1. 16-9. Why would you ever join a table with itself?
        1. It does not seem to make sense to join a table with itself
        2. Why it does make sense
        3. How it is done
      2. 16-10. An example of a self join
      3. 16-11. Handling a sequence of events
      4. 16-12. Generating the numbers from 0 to 999
    3. CrossTab Queries in Access
      1. 16-13. CrossTab queries when there are two dimensions
      2. 16-14. CrossTab queries with up to four dimensions
      3. 16-15. CrossTab queries with more dimensions
      4. 16-16. CrossTab to show who is attending each lunch
      5. 16-17. CrossTab to show the foods for each lunch
    4. CrossTab Queries in Oracle
      1. 16-18. CrossTab queries in Oracle — Part 1
      2. 16-19. CrossTab queries in Oracle — Part 2
    5. Key Points
  19. 17. Combining Tables in a Production Database
    1. Methods of Joining Three or More Tables
      1. 17-1. Joining several tables in a series of steps
      2. 17-2. Joining several tables at once in the where clause
      3. 17-3. Joining several tables at once in the from clause
    2. Losing Information
      1. 17-4. Be careful with an inner join
      2. 17-5. Be careful with a left and right outer join
      3. 17-6. A full outer join preserves all the information
      4. 17-7. A full outer join of several tables
    3. Caring about the Efficiency of Your Computer
      1. 17-8. Monitor your queries
      2. 17-9. Use the indexes
      3. 17-10. Select the data you want early in the process
      4. 17-11. Use a table to save summarized data
      5. 17-12. Try several ways of writing the SQL
    4. Standardizing the Way That Tables Are Joined
      1. 17-13. The joins are part of the database design
      2. 17-14. A view can standardize the way tables are joined
      3. 17-15. Ad hoc reporting
    5. Key Points
  20. 18. If-Then-Else, Parameter Queries, and Subqueries
    1. If-Then-Else Logic
      1. 18-1. The case and decode functions in Oracle
        1. Oracle syntax for the decode function
        2. Oracle case function
      2. 18-2. The Immediate If (iif) function in Access
        1. Access syntax for the immediate if function (iif)
      3. 18-3. Attaching messages to rows
      4. 18-4. Dividing data from one column into two different columns
      5. 18-5. Applying two functions to different parts of the data
    2. Parameter Queries
      1. 18-6. A parameter query in Oracle
      2. 18-7. Using a parameter more than once in Oracle
      3. 18-8. More ways to define parameters in Oracle
      4. 18-9. A parameter query in Access
      5. 18-10. A query in Access with two parameters
      6. 18-11. Limitations on parameters in Access
    3. Subqueries
      1. 18-12. Introduction to subqueries
      2. 18-13. Subqueries that result in a list of values
      3. 18-14. Subqueries that result in a single value
      4. 18-15. Avoid using not in with nulls
    4. Applications of Subqueries
      1. 18-16. Subqueries used in an update command
      2. 18-17. Finding the difference between two tables
      3. 18-18. Using the most current data
    5. Older Features of Subqueries
      1. 18-19. Correlated subqueries
      2. 18-20. Subqueries using exists
      3. 18-21. Using a subquery to write an outer join
      4. 18-22. Nested subqueries
      5. 18-23. Subqueries can be used in limited locations
      6. 18-24. Many subqueries can also be written as a join
    6. Key Points
  21. 19. The Multiuser Environment
    1. Database Configurations
      1. 19-1. The single-user environment
      2. 19-2. The multiuser environment
      3. 19-3. The distributed environment
      4. 19-4. Connecting via the Internet
    2. Operating in a Multiuser Environment
      1. 19-5. How to use a table you do not own
      2. 19-6. Synonyms
      3. 19-7. Snapshots
    3. Security and Privileges
      1. 19-8. Identifying the user
      2. 19-9. Privileges
      3. 19-10. Roles
      4. 19-11. Several people can use the same table at the same time
    4. The Oracle Data Dictionary and the Multiuser Environment
      1. 19-12. ALL versus USER
      2. 19-13. How to find the tables you want in the Data Dictionary
      3. 19-14. How to find the meaning of the columns
    5. Key Points
  22. 20. The Design of SQL
    1. Original SQL Design Objectives
      1. 20-1. Do one thing and do it well
      2. 20-2. Focus on information
      3. 20-3. Keep it simple
      4. 20-4. Coordinate people to work together
    2. Newer Interfaces
      1. 20-5. Forms
      2. 20-6. Reports
      3. 20-7. Web tools
        1. Employee Lunches
    3. Typical Applications
      1. 20-8. Smaller databases
      2. 20-9. OLTP
      3. 20-10. Data warehouses
    4. Key Points
  23. A. Oracle Is Free: How to Get Your Copy
    1. Getting Current Information
    2. Which Version of Oracle Should You Get?
    3. System Requirements
    4. Downloading Oracle from the Internet
    5. Installing Oracle
    6. Setup to Run the Examples in This Book
      1. A-1. Create a new database user
      2. A-2. Download the files to build the Oracle tables
      3. A-3. Build the Oracle tables by running an SQL script
      4. A-4. Disaster recovery if you need it
    7. How to Stop Running Oracle
    8. What to Do if Oracle Slows Down Your Computer
      1. A-5. The official Oracle solution
      2. A-6. My own solution
  24. B. Quick Start with Oracle
    1. Log in to Your Computer
    2. Go to the Database Home Page
    3. Log in to the Oracle Database
    4. Go to the SQL Commands Page
    5. Enter and Run an SQL Query
    6. Optional: Print Your Query and the Results
  25. C. Quick Start with Access
    1. You May Use Access 2007, 2003, 2002, or 2000
    2. How to Start Access
    3. Entering an SQL Query
    4. Dealing with Errors in Access
    5. Printing from Access
    6. Using the Access Trust Center
  26. D. Diagram of the Lunches Database
    1. Join Conditions
    2. Data Validation Rules

Product information

  • Title: SQL Fundamentals, Third Edition
  • Author(s): John J. Patrick
  • Release date: September 2008
  • Publisher(s): Pearson
  • ISBN: 9780137156146