Practical SQL
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology > Databases > Practical SQL: The Sequel
Practical SQL: The Sequel

Practical SQL: The Sequel


     0     
5
4
3
2
1



Available


X
About the Book

For those who are working with SQL systems - or preparing to do so - this book offers information organized by use rather than by feature. Therefore, readers can turn to specific business problems and learn how to solve them with the appropriate SQL features. In particular, the book focuses on the real-world challenges of dealing with legacy systems, inherited problematic code, dirty data, and query tuning for better performance. The following important topics are addressed: * Finding and fixing dirty data with LIKE, BETWEEN, and LOCATE * Managing multiples and other complex data problems with ROWID, SIMILAR, GROUP BY, and HAVING * Handling the multiple display formats of dates * Translating values to expand compressed codes with CASE, DECODE, point functions, UNION, and subqueries * Manipulating numbers, including using auto-numbering mechanisms, finding the high value, locating every Nth, and more. * Tuning queries for enhanced performance, focusing on indexes and the optimizer * Comparing vendors system catalogs and system functions * Using SQL to generate SQL for cleanup and permission scripts as well as creating test data A business-based working database serves as a running example throughout the book. It provides the context for numerous code samples, all of which are tested on multiple systems, including Adaptive Server Anywhere, Oracle, Informix, Microsoft SQL Server, and Sybase Adaptive Server Enterprise. The accompanying CD-ROM contains the full sample database as well as Adaptive Server Anywhere.

Table of Contents:
List of Tables. List of Figures. Acknowledgments. 1. Introduction. In This Chapter. Why This Book? Use, Not Feature. Lots of Examples. Multiple Systems. Legacy. Tuning. Who This Book Is For. Contents. Chapters. Appendices. Speaking Multiple SQLs. SQL Engines. SQL Dialects. Following Conventions. Text. Code. Understanding the MSDPN Database. Table Details. Customer. Supplier. Product. Ordermaster. Orderdetail. Employee. Using the Examples. Summary. 2. Handling Dirty Data. In This Chapter. Dirty Data. Case. Sort Order. UPPER and LOWER in Searches. UPPER and LOWER in UPDATE. UPPER and LOWER with Dates. INITCAP. Space. Removing Spaces. Additional Features. Size. Actual Size. Defined Size. LIKE. Quoting Wildcards with ESCAPE. LIKE Variants. Datatypes and LIKE. Position of Expression in Expression. How LOCATE Works. Using LOCATE Functions. Sounds Like. BETWEEN. Dealing with Dates. Converting Dates (and Other Datatypes). Doing Math on Dates. Finding Dates. Summary. 3. Translating Values. In This Chapter. Why Translate? CASE/DECODE. CASE. DECODE. CASE/DECODE Variations. Translating NULL. COALESCE/ISNULL/NVL. Finding the First Non-NULL: COALESCE. NULLIF. Point Functions. Getting CASE Effects from Functions and Column Values. Getting CASE Effects from Multiple Functions. UNION. How UNION Works. UNION and NULL. UNION Problems? Joins and Outer Joins. Joins and NULL Values. Outer Joins. Subqueries. Subqueries and Displays. Embedded Correlated Subqueries. Correlated and Non-Correlated Subqueries. Another Conditional Expression: TRANSLATE. Summary. 4. Managing Multiples. In This Chapter. What's the Issue with Multiples? Duplicates. Duplicates and a Holding Table. Using ROWID to Remove Duplicates. Near Duplicates. Self Join. Unequal Joins. SIMILAR. Locating Disconnected Rows. Using Outer Joins. Using NOT IN Subqueries. Using MINUS. Counting Items. Grouping by a Subset. Locating the Critical Element. Groups and Outer Joins. Figuring Distribution. Checking Detail against Master. Two Products Together? HAVING. Summary. 5. Navigating Numbers. In This Chapter. Auto-Numbering. ASA: Default. Transact-SQL: Column Property. Microsoft SQL Server: IDENTITY (start, increment). Sybase Adaptive Server Enterprise: IDENTITY. Oracle: CREATE SEQUENCE. Informix: SERIAL Datatype. Associated Issues. Finding the High Value. GROUP BY, COUNT, HAVING MAX (COUNT). FROM Subquery. Row Counts of Various Sorts. Row Numbers. System Numbers. You Make the Numbers. Top N: Six Approaches. 1: Row Limits and ORDER BY. 2: Row Numbers and HAVING. 3: Subquery. 4: Nested Subqueries. 5: Aggregates & Many Copies. 6: Cursors. Finding Every Nth. What Modulo Is. Modulo in WHERE and HAVING. Back to Nth Row. Running Total. Summary. 6. Tuning Queries. In This Chapter. Perform, #%&#@! The Basic Problem. The Optimizer and Tools for Understanding It. Getting Information on Indexes. Checking the Optimizer. SQL Conventions. WHERE Clause. Why a Table Scan? Data Distribution Statistics. Disabling an Index with a Bad WHERE. Comparing Columns in the Same Table. Using Non-Selective Indexes. Doing Math on a Column. Using Functions. Finding Ranges with BETWEEN. Matching with LIKE. Comparing to NULL. Negating with NOT. Converting Values. Using OR. Finding Sets of Values with IN. Using Multi-Column Indexes. Covering Indexes. Joining Columns. Sorting. DISTINCT. UNION. WHERE. HAVING and WHERE. Views. Forcing Indexes. Summary. Asking Performance Questions. USING SQL TO WRITE SQL. In This Chapter. Systematically Speaking. System Catalogs. Listing System Catalogs. Writing Queries Using System Catalogs. System Functions. Getting Administrative Information. Finding Today's Date. Writing SQL with SQL. GRANTing Permissions. Removing Junk Objects. Creating Test Data. Summary. Appendix A. Understanding the Sample. In This Appendix. MegaSysDataProNet Co. Collecting the CREATE Scripts. Adaptive Server Anywhere. Sybase Adaptive Server Enterprise. Microsoft SQL Server. Oracle. Informix. Explaining the INSERT Scripts. INSERT INTO customer. INSERT INTO supplier. INSERT INTO product. INSERT INTO employee. INSERT INTO ordermaster. INSERT INTO orderdetail. Experimenting and Transaction Management. Removing Data and Objects: DROP and DELETE Commands. Remove Database. DROP Commands. DELETE FROM Command. Summary. Appendix B. Comparing Datatypes and Functions. In This Appendix. Comparatively Speaking. Datatype Comparison. Function Comparison. Character (String) Functions. Number Functions. Date Functions. Conditional Functions. Sequential Number Methods. Row Number and Row ID Methods. Other Functions. Tuning Functions. System Functions. Join Syntax Comparison. Notes on Environment and Display. Summary. Appendix C. Using Resources. In This Appendix. Books. General. Informix. Microsoft SQL Server. mSQL/MySQL. Oracle. Sybase. Transact-SQL. Web Sites. Database Vendors. Other Offerings. Newsgroups. Index. 0201616386T04062001

About the Author :
Judith S. Bowman has been a database professional since the early 1980s. She is currently an independent consultant specializing in SQL and relational database issues and is the author of Practical SQL: The Sequel (Addison-Wesley, 2001). 0201616386AB04062001


Best Sellers


Product Details
  • ISBN-13: 9780201616385
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison Wesley
  • Height: 233 mm
  • No of Pages: 352
  • Sub Title: The Sequel
  • Width: 187 mm
  • ISBN-10: 0201616386
  • Publisher Date: 29 Nov 2000
  • Binding: SA
  • Language: English
  • Spine Width: 21 mm
  • Weight: 723 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Practical SQL: The Sequel
Pearson Education (US) -
Practical SQL: The Sequel
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Practical SQL: The Sequel

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    Fresh on the Shelf


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!