1) Netezza SQL Introduction

Accessing NZSQL

Logging On

Understanding the nzsql Prompt

Using NZSQL Commands

Using the nzsql Command Line Options

2) Netezza SQL Basics

Data Types

Exact Numeric Data Types

Approximate Numeric Data Types

Character String Data Types

Logical Data Types

Netezza SQL Interval Support

Functions and Expressions



Math Functions

Character Functions

Date/Time Functions

Conversion Functions

3) Using the NZSQL Grammar:

Managing Databases

Creating a Database

Dropping a Database

Renaming a Database

Changing Database Ownership

4) Managing Tables

Creating a Table

Using Constraints

Removing a Table

Truncating a Table

Renaming a Table

Changing Table Ownership

Inserting Rows Into a Table

Inserting Columns Into a Table

Generating Table Statistics

Querying a Table

Updating Table Rows

Deleting Rows from Tables

Changing or Dropping a Column Value

Changing the Length of a Varchar Column

Changing a Column’s Nam

5) Joining Tables

Using Inner Join Queries

Using Left-Outer Join Queries

Using Self-Join Queries

Combining Tables with UNION, INTERSECT, and EXCEPT

Using the UNION Operation

Using the INTERSECT Operation

Using the EXCEPT Operation

Understanding Precedence Ordering

Handling NULLS

6) Managing Views

Creating Views

Replacing Views

Dropping Views

Renaming Views

Changing View Ownership

Using Materialized Views

Creating Materialized Views

Viewing Materialized Views

Dropping Materialized Views

Altering Materialized Views

Mirroring and SPU Regeneration of Materialized Views

7) Subqueries and Analytical functions

Understanding Subqueries

Understanding Correlated Subqueries

Using Correlated Subqueries in NZSQL

Using Aggregate Functions

Using Analytic Functions

8) Miscellaneous

Using External Tables

About External Tables



Altering and Dropping External Tables

Restrictions and Best Practices for Using External Tables

Nzload utility

Mirroring in Netezza

Performance Tuning