0%

Book Description

The Classic SQL Tutorial: Fully Updated for Today’s Standards and Today’s Top Databases

For twenty years, van der Lans’ Introduction to SQL has been the definitive SQL tutorial for database professionals everywhere, regardless of experience or platform. Now van der Lans has systematically updated this classic guide to reflect the latest SQL standards and the newest versions of today’s leading RDBMSs: Oracle, Microsoft SQL Server, DB2, and MySQL.

Using case study examples and hands-on exercises, van der Lans illuminates every key SQL concept, technique, and statement. Drawing on decades of experience as an SQL standards team member and enterprise consultant, he reveals exactly why SQL works as it does–and how to get the most out of it. You’ll gain powerful insight into everything from basic queries to stored procedures, transactions to data security. Whether you’re a programmer or DBA, a student or veteran, this book will take you from “apprentice” to true SQL master.

  •   Writing queries and updating data: all you need to know about SELECT

  •   Working with joins, functions, and subqueries

  •   Creating database objects: tables, indexes, views, and more

  •   Specifying keys and other integrity constraints

  •   Using indexes to improve efficiency

  •   Enforcing security via passwords and privileges

  •   Building stored procedures and triggers

  •   Developing with embedded SQL and ODBC

  •   Working with transactions, including rollbacks, savepoints, isolation levels, and more

  •   Optimizing performance by reformulating SQL statements

  •   Using object-relational features: subtables, references, sets, and user-defined data types

  •   Reference section: SQL statement definitions and SQL function lists

  • Table of Contents

    1. Copyright
      1. Dedication
    2. About the Author
    3. Preface
      1. Introduction
      2. Topics
      3. Which SQL Dialect?
      4. For Whom Is This Book Intended?
      5. A Practical Book
      6. Practicing with MySQL
      7. What Is on the CD-ROM?
      8. This Book’s Web Site
      9. Prerequisite Knowledge
      10. The History of This Book
      11. The Fourth Edition
      12. And Finally . . .
    4. I. Introduction
      1. 1. Introduction to SQL
        1. 1.1. Introduction
        2. 1.2. Database, Database Server, and Database Language
        3. 1.3. The Relational Model
          1. 1.3.1. Table, Column, and Row
          2. 1.3.2. Constraints
          3. 1.3.3. Primary Key
          4. 1.3.4. Candidate Key
          5. 1.3.5. Alternate Key
          6. 1.3.6. Foreign Key
        4. 1.4. What Is SQL?
        5. 1.5. Several Categories of SQL Applications
        6. 1.6. The History of SQL
        7. 1.7. From Monolithic via Client/Server to the Internet
        8. 1.8. Transaction Databases and Data Warehouses
        9. 1.9. Standardization of SQL
        10. 1.10. The Market of SQL Database Servers
        11. 1.11. Which SQL Dialect?
        12. 1.12. The Structure of the Book
      2. 2. The Tennis Club Sample Database
        1. 2.1. Introduction
        2. 2.2. Description of the Tennis Club
        3. 2.3. The Contents of the Tables
        4. 2.4. Integrity Constraints
      3. 3. Installing the Software
        1. 3.1. Introduction
        2. 3.2. Installation of MySQL
        3. 3.3. Installation of ODBC
        4. 3.4. Installation of WinSQL
        5. 3.5. Downloading SQL Statements from the Web Site
        6. 3.6. Ready?
      4. 4. SQL in a Nutshell
        1. 4.1. Introduction
        2. 4.2. Logging On to the MySQL Database Server
        3. 4.3. Creating New SQL Users
        4. 4.4. Creating Databases
        5. 4.5. Selecting the Current Database
        6. 4.6. Creating Tables
        7. 4.7. The NULL Value
        8. 4.8. Populating Tables with Data
        9. 4.9. Querying Tables
        10. 4.10. Updating and Deleting Rows
        11. 4.11. Optimizing Query Processing with Indexes
        12. 4.12. Views
        13. 4.13. Users and Data Security
        14. 4.14. Deleting Database Objects
        15. 4.15. System Parameters
        16. 4.16. Grouping of SQL Statements
        17. 4.17. The Catalog Tables
        18. 4.18. Definitions of SQL Statements
    5. II. Querying and Updating Data
      1. 5. SELECT Statement: Common Elements
        1. 5.1. Introduction
        2. 5.2. Literals and Their Data Types
          1. 5.2.1. The Integer Literal
          2. 5.2.2. The Decimal Literal
          3. 5.2.3. Float, Real, and Double Literals
          4. 5.2.4. The Alphanumeric Literal
          5. 5.2.5. The Date Literal
          6. 5.2.6. The Time Literal
          7. 5.2.7. The Timestamp Literal
          8. 5.2.8. The Boolean Literal
          9. 5.2.9. The Hexadecimal Literal
        3. 5.3. Expressions
        4. 5.4. Assigning Names to Result Columns
        5. 5.5. The Column Specification
        6. 5.6. The User Variable and the SET Statement
        7. 5.7. The System Variable
        8. 5.8. The Case Expression
        9. 5.9. The Scalar Expression Between Brackets
        10. 5.10. The Scalar Function
        11. 5.11. Casting of Expressions
        12. 5.12. The NULL Value as an Expression
        13. 5.13. The Compound Scalar Expression
          1. 5.13.1. The Compound Numeric Expression
          2. 5.13.2. The Compound Alphanumeric Expression
          3. 5.13.3. The Compound Date Expression
          4. 5.13.4. The Compound Time Expression
          5. 5.13.5. The Compound Timestamp Expression
        14. 5.14. The Aggregation Function and the Scalar Subquery
        15. 5.15. The Row Expression
        16. 5.16. The Table Expression
        17. 5.17. Answers
      2. 6. SELECT Statements, Table Expressions, and Subqueries
        1. 6.1. Introduction
        2. 6.2. The Definition of the SELECT Statement
        3. 6.3. Processing the Clauses in a Select Block
          1. 6.3.1. Example 1
          2. 6.3.2. Example 2
          3. 6.3.3. Example 3
        4. 6.4. Possible Forms of a Table Expression
        5. 6.5. What Is a SELECT Statement?
        6. 6.6. What Is a Subquery?
        7. 6.7. Answers
      3. 7. SELECT Statement: The FROM Clause
        1. 7.1. Introduction
        2. 7.2. Table Specifications in the FROM Clause
        3. 7.3. Again, the Column Specification
        4. 7.4. Multiple Table Specifications in the FROM Clause
        5. 7.5. Pseudonyms for Table Names
        6. 7.6. Various Examples of Joins
        7. 7.7. Mandatory Use of Pseudonyms
        8. 7.8. Explicit Joins in the FROM Clause
        9. 7.9. Joins with USING
        10. 7.10. Outer Joins
          1. 7.10.1. The Left Outer Join
          2. 7.10.2. The Right Outer Join
          3. 7.10.3. The Full Outer Join
        11. 7.11. Additional Conditions in the Join Condition
        12. 7.12. The Cross Join
        13. 7.13. The Union Join and the Natural Join
        14. 7.14. Equi Joins and Theta Joins
        15. 7.15. The FROM Clause with Table Expressions
        16. 7.16. Answers
      4. 8. SELECT Statement: The WHERE Clause
        1. 8.1. Introduction
        2. 8.2. Conditions Using Comparison Operators
        3. 8.3. Comparison Operators with Subqueries
        4. 8.4. Comparison Operators with Correlated Subqueries
        5. 8.5. Conditions Coupled with AND, OR, and NOT
        6. 8.6. The IN Operator with Expression List
        7. 8.7. The IN Operator with Subquery
        8. 8.8. The BETWEEN Operator
        9. 8.9. The LIKE Operator
        10. 8.10. The IS NULL Operator
        11. 8.11. The EXISTS Operator
        12. 8.12. The ALL and ANY Operators
        13. 8.13. Scope of Columns in Subqueries
        14. 8.14. More Examples with Correlated Subqueries
        15. 8.15. Conditions with Negation
        16. 8.16. Future Conditions
        17. 8.17. Answers
      5. 9. SELECT Statement: SELECT Clause and Aggregation Functions
        1. 9.1. Introduction
        2. 9.2. Selecting All Columns (*)
        3. 9.3. Expressions in the SELECT Clause
        4. 9.4. Removing Duplicate Rows with DISTINCT
        5. 9.5. When Are Two Rows Equal?
        6. 9.6. An Introduction to Aggregation Functions
        7. 9.7. The COUNT Function
        8. 9.8. The MAX and MIN Functions
        9. 9.9. The SUM and AVG Functions
        10. 9.10. The VARIANCE and STDDEV Functions
        11. 9.11. Answers
      6. 10. SELECT Statement: The GROUP BY Clause
        1. 10.1. Introduction
        2. 10.2. Grouping on One Column
        3. 10.3. Grouping on Two or More Columns
        4. 10.4. Grouping on Expressions
        5. 10.5. Grouping of NULL Values
        6. 10.6. General Rules for the GROUP BY Clause
        7. 10.7. Complex Examples with GROUP BY
        8. 10.8. Grouping with WITH ROLLUP
        9. 10.9. Grouping with WITH CUBE
        10. 10.10. Grouping Sets
        11. 10.11. Grouping with ROLLUP and CUBE
        12. 10.12. Combining Grouping Sets
        13. 10.13. Answers
      7. 11. SELECT Statement: The HAVING Clause
        1. 11.1. Introduction
        2. 11.2. Examples of the HAVING Clause
        3. 11.3. General Rule for the HAVING Clause
        4. 11.4. Answers
      8. 12. SELECT Statement: The ORDER BY Clause
        1. 12.1. Introduction
        2. 12.2. Sorting on Column Names
        3. 12.3. Sorting on Expressions
        4. 12.4. Sorting with Sequence Numbers and Column Headings
        5. 12.5. Sorting in Ascending and Descending Order
        6. 12.6. Sorting of NULL Values
        7. 12.7. Answers
      9. 13. Combining Table Expressions
        1. 13.1. Introduction
        2. 13.2. Combining with UNION
        3. 13.3. Rules for Using UNION
        4. 13.4. Combining with INTERSECT
        5. 13.5. Combining with EXCEPT
        6. 13.6. Keeping Duplicate Rows
        7. 13.7. Set Operators and the NULL Value
        8. 13.8. Combining Multiple Set Operators
        9. 13.9. Set Operators and the Theory
        10. 13.10. Answers
      10. 14. Updating Tables
        1. 14.1. Introduction
        2. 14.2. Inserting New Rows
        3. 14.3. Populating a Table with Rows from Another Table
        4. 14.4. Updating Values in Rows
        5. 14.5. Deleting Rows from a Table
        6. 14.6. Answers
    6. III. Creating Database Objects
      1. 15. Creating Tables
        1. 15.1. Introduction
        2. 15.2. Creating New Tables
        3. 15.3. Data Types of Columns
          1. 15.3.1. The Integer Data Types
        4. 15.3.2. The Decimal Data Types
          1. 15.3.3. The Float Data Types
          2. 15.3.4. The Alphanumeric Data Types
          3. 15.3.5. The Temporal Data Types
          4. 15.3.6. The Boolean Data Type
          5. 15.3.7. The Blob Data Types
        5. 15.4. Creating Temporary Tables
        6. 15.5. Copying Tables
        7. 15.6. Naming Tables and Columns
        8. 15.7. Column Options: Default and Comment
        9. 15.8. Derived Columns
        10. 15.9. Tables and the Catalog
        11. 15.10. Answers
      2. 16. Specifying Integrity Constraints
        1. 16.1. Introduction
        2. 16.2. Primary Keys
        3. 16.3. Alternate Keys
        4. 16.4. Foreign Keys
        5. 16.5. The Referencing Action
        6. 16.6. Check Integrity Constraints
        7. 16.7. Naming Integrity Constraints
        8. 16.8. Deleting Integrity Constraints
        9. 16.9. Integrity Constraints and the Catalog
        10. 16.10. Answers
      3. 17. Character Sets and Collating Sequences
        1. 17.1. Introduction
        2. 17.2. Available Character Sets and Collating Sequences
        3. 17.3. Assigning Character Sets to Columns
        4. 17.4. Assigning Collating Sequences to Columns
        5. 17.5. Expressions with Character Sets and Collating Sequences
        6. 17.6. Sorting and Grouping with Collating Sequences
        7. 17.7. The Coercibility of Expressions
        8. 17.8. Related System Variables
        9. 17.9. Answers
      4. 18. Changing and Dropping Tables
        1. 18.1. Introduction
        2. 18.2. Deleting Entire Tables
        3. 18.3. Renaming Tables
        4. 18.4. Changing the Table Structure
        5. 18.5. Changing Columns
        6. 18.6. Changing Integrity Constraints
        7. 18.7. Answers
      5. 19. Designing Tables
        1. 19.1. Introduction
        2. 19.2. Which Tables and Columns?
          1. Guideline 1: Define a Primary Key for Each Table
          2. Guideline 2: Each Determinant in a Table Must Be a Candidate Key of That Table
          3. Guideline 3: Do Not Use Repeating Groups in a Table
          4. Guideline 4: Do Not Concatenate Columns
        3. 19.3. Adding Redundant Data
          1. Guideline 5: Add Redundant Data When the Processing Time of SELECT Statements Is Not Acceptable
        4. 19.4. Choosing a Data Type for a Column
          1. Guideline 6: Use the Same Data Types for Columns That Will Be Compared with One Another
          2. Guideline 7: Assign a Column a Numeric Data Type Only if It Will Be Used in Calculations
          3. Guideline 8: Do Not Skimp on the Length of Columns
          4. Guideline 9: Do Not Use the Data Type VARCHAR for All Alphanumeric Columns
        5. 19.5. When Should You Use NOT NULL?
          1. Guideline 10: Use NOT NULL When a Column Must Contain a Value for Every Row
        6. 19.6. Answers
      6. 20. Using Indexes
        1. 20.1. Introduction
        2. 20.2. Rows, Tables, and Files
        3. 20.3. How Does an Index Work?
        4. 20.4. Processing a SELECT Statement: The Steps
        5. 20.5. Creating Indexes
        6. 20.6. Dropping Indexes
        7. 20.7. Indexes and Primary Keys
        8. 20.8. The Big PLAYERS_XXL Table
        9. 20.9. Choosing Columns for Indexes
          1. 20.9.1. A Unique Index on Candidate Keys
          2. 20.9.2. An Index on Foreign Keys
          3. 20.9.3. An Index on Columns Included in Selection Criteria
          4. 20.9.4. An Index on a Combination of Columns
          5. 20.9.5. An Index on Columns Used for Sorting
        10. 20.10. Special Index Forms
          1. 20.10.1. The Multitable Index
          2. 20.10.2. The Virtual Column Index
          3. 20.10.3. The Selective Index
          4. 20.10.4. The Hash Index
          5. 20.10.5. The Bitmap Index
        11. 20.11. Indexes and the Catalog
        12. 20.12. Answers
      7. 21. Views
        1. 21.1. Introduction
        2. 21.2. Creating Views
        3. 21.3. The Column Names of Views
        4. 21.4. Updating Views: WITH CHECK OPTION
        5. 21.5. Deleting Views
        6. 21.6. Views and the Catalog
        7. 21.7. Restrictions on Querying Views
        8. 21.8. Restrictions on Updating Views
        9. 21.9. Processing View Statements
        10. 21.10. Application Areas for Views
          1. 21.10.1. Simplification of Routine Statements
          2. 21.10.2. Reorganizing Tables
          3. 21.10.3. Stepwise Development of SELECT Statements
          4. 21.10.4. Specifying Integrity Constraints
          5. 21.10.5. Data Security
        11. 21.11. Answers
      8. 22. Creating Databases
        1. 22.1. Introduction
        2. 22.2. Databases and the Catalog
        3. 22.3. Creating Databases
        4. 22.4. Updating Databases
        5. 22.5. Dropping Databases
      9. 23. Users and Data Security
        1. 23.1. Introduction
        2. 23.2. Adding and Removing Users
        3. 23.3. Granting Table and Column Privileges
        4. 23.4. Granting Database Privileges
        5. 23.5. Granting User Privileges
        6. 23.6. Passing on Privileges: WITH GRANT OPTION
        7. 23.7. Working with Roles
        8. 23.8. Recording Privileges in the Catalog
        9. 23.9. Revoking Privileges
        10. 23.10. Security of and Through Views
        11. 23.11. Answers
      10. 24. Creating Sequences
        1. 24.1. Introduction
        2. 24.2. Why Do We Need Sequences?
        3. 24.3. Options of the Sequences
        4. 24.4. Retrieving the Last Generated Number
        5. 24.5. Altering and Deleting Sequences
        6. 24.6. Privileges for Sequences
        7. 24.7. Answers
      11. 25. Creating Schemas
        1. 25.1. What Is a Schema?
        2. 25.2. Creating a Schema
        3. 25.3. Removing a Schema
        4. 25.4. Schema Versus SQL User
    7. IV. Programming with SQL
      1. 26. Introduction to Embedded SQL
        1. 26.1. Introduction
        2. 26.2. The Pseudo Programming Language
        3. 26.3. DDL and DCL Statements and Embedded SQL
        4. 26.4. Processing Programs
        5. 26.5. Using Host Variables in SQL Statements
        6. 26.6. The SQLCODE Host Variable
        7. 26.7. Executable Versus Nonexecutable SQL Statements
        8. 26.8. The WHENEVER Statement
        9. 26.9. Logging On to SQL
        10. 26.10. SELECT Statements Returning One Row
        11. 26.11. NULL Values and the NULL Indicator
        12. 26.12. Cursors for Querying Multiple Rows
        13. 26.13. The Direction for Browsing Through a Cursor
        14. 26.14. Processing Cursors
        15. 26.15. The FOR Clause
        16. 26.16. Deleting Rows via Cursors
        17. 26.17. Dynamic SQL
        18. 26.18. Example of a C Program
      2. 27. Transactions and Multi-User Usage
        1. 27.1. Introduction
        2. 27.2. What Is a Transaction?
        3. 27.3. Starting Transactions
        4. 27.4. Embedded SQL and Transactions
        5. 27.5. Savepoints
        6. 27.6. Problems with Multi-User Usage
          1. 27.6.1. Dirty Read or Uncommitted Read
          2. 27.6.2. Nonrepeatable Read or Nonreproducible Read
          3. 27.6.3. Phantom Read
          4. 27.6.4. Lost Update
        7. 27.7. Locking
        8. 27.8. Deadlocks
        9. 27.9. The Granularity of Locked Data
        10. 27.10. The LOCK TABLE Statement
        11. 27.11. The Isolation Level
        12. 27.12. Answers
      3. 28. Introduction to ODBC
        1. 28.1. Introduction
        2. 28.2. The History of ODBC
        3. 28.3. How Does ODBC Work?
        4. 28.4. A Simple Example of ODBC
        5. 28.5. Return Codes
        6. 28.6. Retrieving Data About SQL
        7. 28.7. DDL Statements and ODBC
        8. 28.8. DML Statements and ODBC
        9. 28.9. Using Host Variables in SQL Statements
        10. 28.10. Settings for a Statement Handle
        11. 28.11. SELECT Statements
          1. 28.11.1. Retrieving Data Value by Value
          2. 28.11.2. Retrieving Data Row by Row
          3. 28.11.3. Retrieving Data in Groups of Rows
        12. 28.12. Asynchronous Processing of SQL Statements
        13. 28.13. The FOR Clause
        14. 28.14. Accessing Catalog Tables with ODBC
        15. 28.15. Levels and Support
        16. 28.16. The Competitors of ODBC
      4. 29. Optimization of Statements
        1. 29.1. Introduction
        2. 29.2. Avoid the OR Operator
        3. 29.3. Avoid Unnecessary Use of the UNION Operator
        4. 29.4. Avoid the NOT Operator
        5. 29.5. Isolate Columns in Conditions
        6. 29.6. Use the BETWEEN Operator
        7. 29.7. Avoid Particular Forms of the LIKE Operator
        8. 29.8. Add Redundant Conditions to Joins
        9. 29.9. Avoid the HAVING Clause
        10. 29.10. Make the SELECT Clause as Small as Possible
        11. 29.11. Avoid DISTINCT
        12. 29.12. Use the ALL Option with Set Operators
        13. 29.13. Prefer Outer Joins to UNION Operators
        14. 29.14. Avoid Data Type Conversions
        15. 29.15. The Largest Table Last
        16. 29.16. Avoid the ANY and ALL Operators
        17. 29.17. The Future of the Optimizer
        18. 29.18. Answers
    8. V. Procedural Database Objects
      1. 30. Stored Procedures
        1. 30.1. Introduction
        2. 30.2. An Example of a Stored Procedure
        3. 30.3. The Parameters of a Stored Procedure
        4. 30.4. The Body of a Stored Procedure
        5. 30.5. Local Variables
        6. 30.6. The SET Statement
        7. 30.7. Flow-Control Statements
        8. 30.8. Calling Stored Procedures
        9. 30.9. Stored Procedures with SELECT INTO
        10. 30.10. Error Messages, Handlers, and Conditions
        11. 30.11. Stored Procedures with a Cursor
        12. 30.12. Stored Procedures and Transactions
        13. 30.13. Stored Procedures and the Catalog
        14. 30.14. Removing Stored Procedures
        15. 30.15. Compiling and Recompiling
        16. 30.16. Security with Stored Procedures
        17. 30.17. Advantages of Stored Procedures
      2. 31. Stored Functions
        1. 31.1. Introduction
        2. 31.2. Examples of Stored Functions
        3. 31.3. Removing Stored Functions
      3. 32. Triggers
        1. 32.1. Introduction
        2. 32.2. An Example of a Trigger
        3. 32.3. More Complex Examples
        4. 32.4. Triggers as Integrity Constraints
        5. 32.5. Removing Triggers
        6. 32.6. Differences Between SQL Products
        7. 32.7. Answers
    9. VI. Object Relational Concepts
      1. 33. User-Defined Data Types, Functions, and Operators
        1. 33.1. Introduction
        2. 33.2. Creating User-Defined Data Types
        3. 33.3. Access to Data Types
        4. 33.4. Casting of Values
        5. 33.5. Creating User-Defined Operators
        6. 33.6. Opaque Data Type
        7. 33.7. Named Row Data Type
        8. 33.8. The Typed Table
        9. 33.9. Integrity Constraints on Data Types
        10. 33.10. Keys and Indexes
        11. 33.11. Answers
      2. 34. Inheritance, References, and Collections
        1. 34.1. Inheritance of Data Types
        2. 34.2. Linking Tables via Row Identifications
        3. 34.3. Collections
        4. 34.4. Inheritance of Tables
      3. 35. The Future of SQL
    10. A. Syntax of SQL
      1. A.1. Introduction
      2. A.2. The BNF Notation
        1. The Symbols < and >
        2. The ::= Symbol
        3. The | Symbol
        4. The Symbols [ and ]
        5. The ... Symbol
        6. The Symbols { and }
        7. The ; Symbol
        8. The " Symbol
        9. Additional Remarks
      3. A.3. Reserved Words in SQL3
      4. A.4. Syntax Definitions of SQL Statements
        1. A.4.1. Groups of SQL Statements
        2. A.4.2. Definitions of SQL Statements
        3. A.4.3. Common Elements
    11. B. Scalar Functions
      1. ABS(par1)
      2. ACOS(par1)
      3. ADDDATE(par1, par2)
      4. ADDTIME(par1, par2)
      5. ASCII(par1)
      6. ASIN(par1)
      7. ATAN(par1)
      8. ATAN2(par1, par2)
      9. ATANH(par1)
      10. BIN(par1)
      11. BIT_COUNT(par1)
      12. BIT_LENGTH(par1)
      13. CEILING(par1)
      14. CHAR(par1)
      15. CHARACTER_LENGTH(par1)
      16. CHARSET(par1)
      17. CHAR_LENGTH(par1)
      18. CHR(par1)
      19. COALESCE(par1, par2, par3, ...)
      20. COERCIBILITY(par1)
      21. COLLATION (par1)
      22. CONCAT(par1, part2)
      23. CONNECTION_ID()
      24. CONV(par1, part2, par3)
      25. CONVERT(par1, par2)
      26. CONVERT_TZ(par1, part2, par3)
      27. COS(par1)
      28. COT(par1)
      29. CURDATE()
      30. CURRENT_DATE()
      31. CURRENT_TIME()
      32. CURRENT_TIMESTAMP()
      33. CURRENT_USER()
      34. CURTIME()
      35. DATABASE()
      36. DATE(par1)
      37. DATE_ADD(par1, par2)
      38. DATEDIFF(par1, par2)
      39. DATE_FORMAT(par1, par2)
      40. DATE_SUB(par1, par2)
      41. DAY(par1)
      42. DAYNAME(par1)
      43. DAYOFMONTH(par1)
      44. DAYOFWEEK(par1)
      45. DAYOFYEAR(par1)
      46. DEFAULT()
      47. DEGREES(par1)
      48. EXP(par1)
      49. FLOOR(par1)
      50. FORMAT(par1, par2)
      51. FOUND_ROWS()
      52. FROM_DAYS(par1)
      53. GET_FORMAT(par1, par2)
      54. GREATEST(par1, par2, ...)
      55. HEX(par1)
      56. HOUR(par1)
      57. IF(par1, par2, par3)
      58. IFNULL(par1, par2)
      59. INSERT(par1, par2, par3, par4)
      60. INSTR(par1, par2)
      61. INTERVAL(par, par2, par3, ...)
      62. ISNULL(par1)
      63. LAST_DAY(par1)
      64. LCASE(par1)
      65. LEAST(par1, par2, ...)
      66. LEFT(par1, par2)
      67. LENGTH(par1)
      68. LN(par1)
      69. LOCALTIME()
      70. LOCALTIMESTAMP()
      71. LOCATE(par1, par2, par3)
      72. LOG(par1)
      73. LOG(par1, par2)
      74. LOG2(par1)
      75. LOG10(par1)
      76. LOWER(par1)
      77. LPAD(par1, par2, par3)
      78. LTRIM(par1)
      79. MAKEDATE(par1, par2)
      80. MAKETIME(par1, par2, par3)
      81. MICROSECOND(par1)
      82. MID(par1, par2, par3)
      83. MINUTE(par1)
      84. MOD(par1)
      85. MONTH(par1)
      86. MONTHNAME
      87. NOW()
      88. NULLIF(par1, par2)
      89. OCT(par1)
      90. OCTET_LENGTH(par1)
      91. ORD(par1)
      92. PERIOD_ADD(par1, par2)
      93. PERIOD_DIFF(par1, par2)
      94. PI()
      95. POWER(par1, par2)
      96. QUARTER
      97. RADIANS(par1)
      98. RAND(par1)
      99. REPEAT(par1, par2)
      100. REPLACE(par1, par2, par3)
      101. REVERSE(par1)
      102. RIGHT(par1, par2)
      103. ROUND(par1, par2)
      104. RPAD(par1, par2, par3)
      105. RTRIM(par1)
      106. SECOND(par1)
      107. SEC_TO_TIME(par1)
      108. SESSION_USER()
      109. SIGN(par1)
      110. SIN(par1)
      111. SOUNDEX(par1)
      112. SPACE(par1)
      113. SQRT(par1)
      114. STRCMP(par1, par2)
      115. STR_TO_DATE(par1, par2)
      116. SUBDATE(par1, par2)
      117. SUBSTRING(par1, par2, par3)
      118. SUBSTRING(par1 FROM par2 FOR par3)
      119. SUBSTRING_INDEX(par1, par2, par3)
      120. SUBTIME(par1, par2)
      121. SYSDATE()
      122. SYSTEM_USER()
      123. TAN(par1)
      124. TIME()
      125. TIMEDIFF(par1, par2)
      126. TIME_FORMAT(par1, par2)
      127. TIMESTAMP(par1, par2)
      128. TIMESTAMPADD(par1, par2, par3)
      129. TIMESTAMPDIFF(par1, par2, par3)
      130. TIME_TO_SEC(par1)
      131. TO_DAYS(par1)
      132. TRIM(par1)
      133. TRUNCATE(par1, par2)
      134. UCASE(par1)
      135. UNHEX(par1)
      136. UPPER(par1)
      137. USER()
      138. UTC_DATE()
      139. UTC_TIME()
      140. UTC_TIMESTAMP()
      141. UUID()
      142. VERSION()
      143. WEEK(par1)
      144. WEEKDAY(par1)
      145. WEEKOFYEAR(par1)
      146. YEAR(par1)
      147. YEARWEEK(par1, par2)
    12. C. Bibliography
    13. D. About the CD-ROM
      1. System Requirements
        1. Operating Systems
      2. Contents
      3. Installation and Use
      4. Technical Support
    3.145.93.136