SET SESSION ACCOUNT Syntax Elements - Advanced SQL Engine - Teradata Database
SQL Data Definition Language Syntax and Examples
Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
Introduction to SQL Data Definition Language Syntax and Examples
Changes and Additions
SQL DDL Statements
How the Statements are Organized
List of SQL Statements and Purposes
Table Statements
CREATE TABLE and CREATE TABLE … AS
CREATE TABLE Syntax
CREATE TABLE … AS Syntax
Syntax Elements
table_kind
table_specification
table_option
MAP
Usage Notes
Examples
FALLBACK
WITH JOURNAL TABLE
LOG
BEFORE JOURNAL
AFTER JOURNAL
JOURNAL
CHECKSUM
FREESPACE
mergeblockratio
Example: Specifying Various MERGEBLOCKRATIO Settings
data_block_size
Example: Specifying DATABLOCKSIZE, CHECKSUM, and FREESPACE
blockcompression
isolated_loading
column_partition_definition
column_name
data type
column_data_type_attribute
UPPERCASE
CASESPECIFIC
FORMAT quotestring
TITLE quotestring
NAMED name
DEFAULT
WITH DEFAULT
CHARACTER SET server_character_set
NULL
AUTO COLUMN
Examples: Creating a Table with a JSON Auto Column
compression_attribute
COMPRESS constant
COMPRESS USING
DECOMPRESS USING
column_constraint_attribute
CONSTRAINT
UNIQUE
PRIMARY KEY
CHECK Constraint Column Attribute
Example: Specifying Column-Level Named CHECK Constraints
REFERENCES Constraint Column Attribute
identity_column
Identity Column Parameters
COLUMN
ROW
(column_name)
AUTO COMPRESS
PERIOD FOR
Example: Creating a Table with a Derived Period Column
normalize_option
table_constraint
PRIMARY KEY (column_name)
CHECK (boolean_condition)
FOREIGN KEY
WITH NO CHECK OPTION
row_level_security_constraint_column_name CONSTRAINT
index
PRIMARY INDEX
NO PRIMARY
PRIMARY AMP
PARTITION BY
partitioning level
UNIQUE INDEX
ORDER BY
WITH LOAD IDENTITY
table_preservation
AS_clause
source_table
subquery_clause
WITH DATA
WITH NO DATA
AND [NO] STATISTICS
Example: Copying Statistics
Example: Copying Statistics for All Columns
Example: Copying Zeroed Statistics
Example: Copying Zeroed Multicolumn and Composite Index Statistics
Example: Copying PARTITION Statistics
INDEX Definitions
Example: Comparing CREATE TABLE … AS and CT … AS in Regard to Table Kind
Example: Copy Table with Data and Default Column Names
Example: Copy Table Without Data and Default Column Names
Example: Changing Column Grouping for a Column-Partitioned Table Using CREATE TABLE … AS Syntax
ANSI Compliance
Examples
Example: CHARACTER Partitioning Using a CASE_N Function
Example: CHARACTER Partitioning Defined Using a RANGE_N Function
Example: Character Partitioning Defined Using RANGE_N Functions
Example: Character Partitioning, Session Mode, and Case Specificity
Example: Character Partitioning and System-Derived PARTITION[#Ln] Columns
Example: RANGE_N Partitioning Expression Using the END Bound Function
Example: CASE_N Partitioning Expression Using the END Bound Function
Example: 15 Levels of Multilevel Partitioning
Example: Volatile Table With Single-Level Partitioning
Example: Global Temporary Table With Single-Level Partitioning
Example: Specifying a Column-Level Primary Key
Example: Default Primary Index When Neither Primary Index Nor Primary Key Is Specified
Example: Local Journaling
Example: AS … WITH NO DATA With Named Expressions
Example: AS … WITH NO DATA With a Nonunique Secondary Index
Example: AS … WITH DATA With a Nonunique Secondary Index
Example: Statistics Not Copied
Example: Statistics Are Not Copied for Conditions in The Subquery
Example: Statistics Are Not Copied When Set Or Aggregation Operators Are Specified In The Query
Example: Statistics Are Not Copied If An OLAP Operation Is Specified in The Subquery
Example: Statistics Are Not Copied If a Join Operation Is Specified in the Subquery
Example: Statistics Are Not Copied If Functions Or Expressions Are Specified in the Subquery
Example: CREATE … AS Requests That Produce a Table With a Primary Index
Example: CREATE Request with Presence or Absence of PRIMARY KEY or UNIQUE Constraint and Setting of PrimaryIndexDefault
Example: NoPI Table CREATE Request That Converts PRIMARY KEY or UNIQUE Constraints to USIs
Example: CREATE Request That Produces a NoPI Table
Example: CREATE … AS Requests That Produce a NoPI Table
Example: Current and Historical Partitioning Using CURRENT_DATE in a CASE_N Expression
Example: CURRENT_DATE Built-In Function in a CASE_N Expression
Example: Quarterly Partitioning Using CURRENT_DATE in a RANGE_N Expression
Example: Historical and Current Partitioning Using CURRENT_DATE in a CASE_N Expression
Example: Partitioning Expression With TIMESTAMP Data Type
Example: Partitioning Expression That Specifies AT LOCAL Date
Example: Grouping Columns in the Column List of a Column-Partitioned Table Rather Than in the Partitioning Expression
Example: Column-Partitioned Table With Default Autocompression
Example: Columns Defined Using Different Types of NUMBER Types
Example: UDT Primary and Secondary Index Examples
Example: Specifying the Same Column in Different Ways
Example: Create Tables with ST_GEOMETRY Data Type Columns
Example: Create Tables with XML Data Type Columns
Example: Create Tables with JSON Data Type Columns
Example: Creating a Table With Row-Level Security Constraints
Related Topics
CREATE TABLE (Queue Table Form)
Syntax
CREATE TABLE Syntax Elements (Queue Table Form)
table_kind
table_specification
table_option
MAP
Usage Notes
Example
FALLBACK
FREESPACE
data_block_size
blockcompression
CHECKSUM
QITS_specification
QITS_column_name
column_name
compression_attributes
column_attribute
column_constraint_attributes
CONSTRAINT name
UNIQUE
PRIMARY KEY
column_name
CHECK (boolean condition)
column_identity_attributes
identity_attribute
START WITH
INCREMENT BY
MINVALUE
MAXVALUE
CYCLE
index_specification
PRIMARY INDEX
INDEX, secondary index definition
INDEX, secondary index definition using an ORDER BY clause
ORDER BY, Index Definition
ANSI Compliance
Examples
Example: Creating a Simple Queue Table
Example: Creating a Multiset Queue Table
Related Topics
CREATE GLOBAL TEMPORARY TRACE TABLE
CREATE GLOBAL TEMPORARY TRACE TABLE Syntax
CREATE GLOBAL TEMPORARY TRACE TABLE Syntax Elements
ANSI Compliance
CREATE GLOBAL TEMPORARY TRACE TABLE Examples
Related Topics
CREATE FOREIGN TABLE
CREATE FOREIGN TABLE Syntax
CREATE FOREIGN TABLE Syntax Elements
MULTISET
table_specification
table_options
external_security_clause
location_column
payload_column
data_column_definition
USING Clause
LOCATION
PATHPATTERN
MANIFEST
ROWFORMAT
STOREDAS
NO PRIMARY INDEX
PARTITION BY COLUMN
ANSI Compliance
Usage Notes
External File Types
External File Object Rules
JSON External Files
CSV External Files
CSV File Headers and Schemas
Parquet External Files
Foreign Table Locking
Queries on External Data are Nondeterministic
LOCATION Key Prefix Best Practices
Indexes and Foreign Tables
Table Types and Foreign Tables
Copying Foreign Tables
Load Isolation and Foreign Tables
Column Level Compression and Foreign Tables
Disable HASH BY RANDOM
Native Object Store Limitations
Examples
Example: Creating a Foreign Table with Default Columns and Options
Example: Creating a Foreign Table with a Pathpattern Definition
Example: Creating a Foreign Table with a Payload Column that Uses the Latin Character Set
Example: Specifying a Definer Authorization for a Foreign Table
Example: Specifying an Invoker Authorization for a Foreign Table
Setting Up an Object Store for River Flow Data
Example: Creating a Foreign Table with a Schema Definition to Access a CSV File
Example: Copying a Foreign Table, Not Including Data
Example: Copying Data from a Foreign Table into a Permanent Table
Example: Creating a Foreign Table to Access Parquet Data
Example: Importing External Data From a Foreign Table into a Permanent Table
Example: SHOW TABLE for a Foreign Table
CREATE ERROR TABLE
CREATE ERROR TABLE Syntax
CREATE ERROR TABLE Syntax Elements
error_table_name_specification
data_table_name_specification
NO RLS
ANSI Compliance
CREATE ERROR TABLE Examples
Related Topics
ALTER TABLE
ALTER TABLE Syntax (Basic)
ALTER TABLE Syntax (Join Index)
ALTER TABLE Syntax (Revalidation)
ALTER TABLE Syntax (Release Rows)
ALTER TABLE Syntax Elements
ALTER TABLE Syntax Elements (Basic)
ALTER TABLE Basic Options
NORMALIZE
MODIFY PRIMARY
MODIFY NO PRIMARY
MODIFY partitioning
FROM TIME ZONE
DOWN TABLE Option
DOWN
ALTER TABLE Syntax Elements (Join Index)
ALTER TABLE Join Index Options
ADD COLUMN (column_name)
ADD ROW (column_name)
ADD SYSTEM (column_name )
ADD (column_name ) AUTO COMPRESS
ALTER TABLE Revalidation Options
REVALIDATE
PRIMARY INDEX
WITH DELETE
WITH INSERT
ALTER TABLE Release Rows Options
Alter Options
ADD column_name
ADD COLUMN (column_name)
ADD ROW (column_name)
ADD SYSTEM (column_name )
ADD (column_name ) AUTO COMPRESS
ADD PERIOD FOR
ADD CONSTRAINT name
ADD row_level_security_constraint_name CONSTRAINT
ADD FOREIGN KEY REFERENCES
ADD CHECK (boolean_condition)
ADD UNIQUE (column_name)
ADD PRIMARY KEY (column_name)
MODIFY CHECK (boolean_condition )
RENAME
DROP PERIOD FOR
DROP column_name
DROP CONSTRAINT name
DROP row_level_security_constraint_name CONSTRAINT
DROP FOREIGN KEY REFERENCES
DROP CHECK
DROP INCONSISTENT REFERENCES
Table Options
FALLBACK
WITH JOURNAL TABLE
JOURNAL
LOG
AFTER JOURNAL
JOURNAL
ON COMMIT
CHECKSUM
DEFAULT FREESPACE
FREESPACE
MERGEBLOCKRATIO
DATABLOCKSIZE
BLOCKCOMPRESSION
WITH ISOLATED LOADING
Column Attributes
UPPERCASE
CASESPECIFIC
FORMAT quotestring
TITLE quotestring
NAMED name
DEFAULT
WITH DEFAULT
CHARACTER SET server_character_set
NULL
AUTO COLUMN
NO COMPRESS
COMPRESS
COMPRESS USING
DECOMPRESS USING
UNIQUE
PRIMARY KEY
CHECK (boolean_ condition)
REFERENCES
Alter Partitioning
PARTITION BY
PARTITION BY COLUMN
NOT PARTITIONED
DROP RANGE
ADD RANGE
WITH DELETE
WITH INSERT
ANSI Compliance
Examples
ALTER TABLE NORMALIZE Examples
ALTER TABLE MODIFY PRIMARY Examples
ALTER TABLE MODIFY NO PRIMARY Examples
ALTER TABLE MODIFY partitioning Examples
Example: Migrating Data to a New Time Zone
Example: Using SET DOWN
Example: Using RESET DOWN
ALTER TABLE Join Index Examples
ALTER TABLE RELEASE ROWS Examples
ALTER TABLE ADD column_name Examples
ALTER TABLE ADD COLUMN (column_name) Examples
ALTER TABLE ADD ROW (column_name) Examples
Example: Adding a Single-Column Partition to a Table
Example: Adding a Single-Column Partition
Example: Adding a Column to a Single-Column Partition
Example: Attempting to Add and Drop Constraints in the Same Statement
Example: Attempting to Add a Constraint with a Duplicate Name
Example: Adding a Row-Level Security Constraint
Example: Adding a FOREIGN KEY Constraint
Example: Adding or Dropping a Batch Referential Constraint
Example: Adding a Table-Level Referential Constraint
Example: Adding a NORMALIZE Constraint to a Table
Example: Adding a Foreign Key to a Column-Partitioned Table
Example: Adding a Named CHECK Constraint to a Table
Example: Adding an Unnamed CHECK Constraint
Example: Adding a Column With an Unnamed CHECK Constraint
Example: Adding a Named UNIQUE Constraint to a Table
Example: Adding a Multicolumn Unnamed UNIQUE Constraint
Example: Adding a PRIMARY KEY Constraint to a Table
Example: Modifying a Named CHECK Constraint
Example: Attempting to Modify a Nonexistent Constraint
Example: Adding a Derived Period Column to a Table
Example: Dropping the IDENTITY Attribute From a Column Without Dropping the Column
Example: Dropping a Row-Level Security Constraint
Example: Dropping a Column from a Column Partition and Modifying it to Become a Two-Column Partition
Example: Dropping a Column from a Column Partition and Modifying it to become a Single-Column Partition
Example: Dropping a Column from a Column Partition Which Also Drops the Partition
Example: Dropping 2 Columns from a Column Partition Which Also Drops the Partition
Example: Dropping All But 1 Column from a Column Partition
Example: Dropping a Named Constraint From a Table
Example: Dropping a Named CHECK Constraint From a Table
Example: Dropping a UNIQUE Constraint From a Table
Example: Dropping a Named Constraint From a Table
Example: Dropping an Unnamed Column-Level CHECK Constraint
Example: Adding an Unnamed CHECK Constraint
Example: Attempting to Drop a Nonexistent Constraint
Example: Adding a Named FOREIGN KEY Constraint to a Table
Example: Dropping a FOREIGN KEY Constraint
Example: Dropping All Unnamed Table-Level CHECK Constraints
Example: Adding Fallback to a Table
Example: Adding a Single Before-Image Journal and Dual After-Image Journal to a Table
Example: Changing a Single Before-Image Journal to a Dual Before-Image Journal and Dropping Two Columns
Example: Changing CHECKSUM to the Default
Example: Changing FREESPACE
Example: Modifying MERGEBLOCKRATIO
Example: Changing DATABLOCKSIZE
Example: Adding a TITLE Phrase to a Column
Example: Adding the Null Attribute to Columns
Example: Making Composite Changes to a Column: NULL to NOT NULL
Example: Making Composite Changes to a Column: NOT NULL to NULL
Examples: Adding and Removing the JSON Auto Column Option
Example: Changing NO COMPRESS for an Existing Column
Example: Changing the Value Compression for a Compressed Column
Example: Adding a New Column With Multivalue Compression
Example: Adding and Changing Algorithmic Compression
Table Definitions for Examples
Example: Modifying Partition Ranges
Example: Non-Valid MODIFY PRIMARY INDEX Statements
Example: Changing a CASE_N-Based Row Partitioning Expression
Example: Adding a Name to a Previously Unnamed Primary Index
Example: Modifying Partitioning for Multilevel Partitioned Tables
Example: Modifying Row Partitioning for Multilevel Column-Partitioned Tables
Example: Modifying Character Partitioning for a Row-Partitioned Table
Example: Modifying Character Partitioning for a Column-Partitioned Table
Example: Dropping and Adding Partition Ranges
Example: Drop and Add Partition Ranges and Delete Rows Outside the Defined Ranges
Example: Dropping a Row Range Partition When Partitioning is Defined With a RANGE_N Function and a NO RANGE Partition
Example: Dropping Ranges Without an EACH Clause
Example: Using MODIFY to Repartition a Table and Saving Resulting Nonvalid Rows in a Save Table
Example: Revalidating the Partitioning for a Table
Related Topics
ALTER TABLE (Map and Colocation Form)
ALTER TABLE Syntax (Map and Colocation Form)
Syntax Elements
Usage Notes
Examples
ALTER TABLE TO CURRENT
ALTER TABLE TO CURRENT Syntax
ALTER TABLE TO CURRENT Syntax Elements
table_name
join_index_name
WITH INSERT INTO save_table
WITH DELETE
ANSI Compliance
Usage Considerations
ALTER TABLE TO CURRENT Processing
ALTER TABLE TO CURRENT Examples
Related Topics
RENAME TABLE
RENAME TABLE Syntax
RENAME TABLE Syntax Elements
old_table_name
TO
new_table_name
ANSI Compliance
RENAME TABLE Example
Related Topics
DROP TABLE
DROP TABLE Syntax
DROP TABLE Syntax Elements
table_name
TEMPORARY
FOREIGN
ALL
ANSI Compliance
DROP TABLE Examples
Related Topics
DROP ERROR TABLE
DROP ERROR TABLE Syntax
DROP ERROR TABLE Syntax Elements
ANSI Compliance
Example: Dropping an Error Table
Related Topics
HELP COLUMN
HELP COLUMN Syntax
HELP COLUMN Syntax Elements
ANSI Compliance
Examples
Example: HELP COLUMN Sample Output
Example: HELP COLUMN column_name
Example: HELP COLUMN for All Columns
Example: HELP COLUMN for Fully Qualified Columns
Example: HELP COLUMN for a Table
Example: HELP COLUMN On Non-Column Expressions Only
Example: HELP COLUMN On Multiple table_name.* Expressions
Example: HELP COLUMN On a Mixture of Non-Column Expressions and table_name .* Expressions
Example: Partitioned Primary Index Table
Example: HELP COLUMN for a Distinct UDT Column
Example: HELP COLUMN with a Derived Period Column
Example: HELP COLUMN for Temporal Columns
Example: HELP COLUMN for a JSON Column with the Auto Column Option
Related Topics
HELP CONSTRAINT
HELP CONSTRAINT Syntax
HELP CONSTRAINT Syntax Elements
ANSI Compliance
HELP CONSTRAINT Examples
Related Topics
HELP ERROR TABLE
HELP ERROR TABLE Syntax
HELP ERROR TABLE Syntax Elements
ANSI Compliance
Usage Notes
Related Topics
HELP TABLE
HELP TABLE Syntax
HELP TABLE Syntax Elements
ANSI Compliance
Usage Considerations
Table Columns
Examples
Example: HELP TABLE
Example: HELP TABLE with a UDT Column
Example: HELP TABLE with Temporal Columns
Example: HELP TABLE with a JSON Auto Column
HELP VOLATILE TABLE
HELP VOLATILE TABLE Syntax
HELP VOLATILE TABLE Syntax Elements
ANSI Compliance
Usage Considerations
Volatile Table Attributes
Example: HELP VOLATILE TABLE
Related Topics
SHOW TABLE
SHOW TABLE Syntax
SHOW TABLE Syntax Elements
ANSI Compliance
Usage Notes
Exceptions to the SHOW TABLE Table Definition
Examples
Example: SHOW TABLE
Example: SHOW TABLE with Column-Level Named Constraints
Example: SHOW TABLE with REFERENCES Constraint
Example: SHOW TABLE for a Table Created without Specifying a MERGEBLOCKRATIO Option
Example: SHOW TABLE for a User with a Default Character Type of Latin
Example: SHOW TABLE for Algorithmic Compression
Example: SHOW TABLE for a Column-Partitioned Table or Join Index
Example: SHOW TABLE in XML Format
Example: SHOW TABLE with a Derived Period Column
Example: SHOW TABLE with an Auto Column
View Statements
CREATE VIEW and REPLACE VIEW
CREATE VIEW and REPLACE VIEW Syntax
CREATE VIEW and REPLACE VIEW Syntax Elements
locking_clause
as_of_clause
nonrecursive_with_modifier
recursive_with_modifier
seed
union_specification
recursive
implicit_join
explicit_join
selection
source
search_condition
group_specification
having_condition
qualify_condition
WITH CHECK OPTION
order_by_specification
ANSI Compliance
CREATE VIEW and REPLACE VIEW Examples
Related Topics
CREATE RECURSIVE VIEW and REPLACE RECURSIVE VIEW
CREATE RECURSIVE VIEW and REPLACE RECURSIVE VIEW Syntax
CREATE RECURSIVE VIEW and REPLACE RECURSIVE VIEW Syntax Elements
locking_specification
item_to_lock
date_specification
seed_statement
FROM seed_statement_source
WHERE search_condition
GROUP BY grouping_specification
HAVING having_condition
QUALIFY qualify_condition
ANSI Compliance
Examples
Example: A Simple Recursive View
Example: Simple REPLACE RECURSIVE VIEW
Example: Controlling Infinite Recursion
Example: Aggregate and Ordered Analytic Function Usage
Example: Left Outer Join Usage
Example: Right Outer Join Usage
Example: Full Outer Join Usage
Example: Mutual Recursion
Example: RECURSIVE Specified for a Non-Recursive View
Example: GROUP BY Clause Usage
Related Topics
RENAME VIEW
RENAME VIEW Syntax
RENAME VIEW Syntax Elements
ANSI Compliance
RENAME VIEW Example
DROP VIEW
DROP VIEW Syntax
DROP VIEW Syntax Elements
ANSI Compliance
Example: Dropping a View
Related Topics
HELP VIEW
HELP VIEW Syntax
HELP VIEW Syntax Elements
ANSI Compliance
Example: HELP VIEW for a UDT View
Index Statements
CREATE INDEX
CREATE INDEX Syntax
CREATE INDEX Syntax Elements
index_specification
UNIQUE
index_name
ALL
index_column_name
ordering_clause
loading_clause
table_specification
join_index_specification
ANSI Compliance
Examples
Example: Creating Named Indexes
Example: Creating a Named Unique Secondary Index
Example: Creating a Named Nonunique Secondary Index
Example: Creating an Unnamed Unique Secondary Index
Example: Creating an Unnamed Nonunique Secondary Index
Example: Creating a Secondary Index on a Join Index
Example: Defining Secondary Indexes on UDT Columns
Examples: Creating Indexes on Load Isolated Tables
CREATE JOIN INDEX
CREATE JOIN INDEX Syntax
CREATE JOIN INDEX Syntax Elements
table_option
MAP
Usage Notes
Example: Creating a Join Index with a Sparse Map
FALLBACK
CHECKSUM
BLOCKCOMPRESSION
select_clause
selection
aggregation_clause
SUM(numeric_expression )
COUNT(value_expression)
MIN (value_expression)
MAX(value_expression)
EXTRACT FROM
AS expression_alias
Row Compression
Repeating Column Set for Join Index Row Compression
Fixed Column Set for Join Index Row Compression
Grouping Column-Partitioned Join Index Column Data
FROM source
joined_table
WHERE search_condition
GROUP BY grouping_or_ordering_specification
ORDER BY grouping_or_ordering_specification
index
PRIMARY INDEX
PRIMARY AMP
NO PRIMARY
PARTITION BY
INDEX
ANSI Compliance
Examples
Example: Creating and Using a Simple Join Index
Example: Creating and Using a Simple Row-Compressed Join Index
Example: Defining and Using a Simple Join Index With an n -way Join Result
Example: Using the EXTRACT Function With a Join Index Definition
Example: Creating and Using an Aggregate Join Index
Example: Creating an Aggregate Join Index Using the MIN and MAX Functions
Example: Creating a Join Index With a Single-Level Partitioned Primary Index
Example: An SLPPI Join Index and Performance
Example: Join Index Coverage
Example: Exceptions to Join Index Coverage
Example: Creating a Join Index With a Partitioned PPI Using a CURRENT_DATE Function
Example: Creating a Join Index With a Period Column in its Select List
Example: Creating a Join Index With a BEGIN Bound Function in its Select List
Example: Creating a Join Index with a Multicolumn CASE Expression in its Select List
Example: Creating a Join Index With a P_INTERSECT Expression in the Select List
Example: Creating an Aggregate Join Index With a Nested Expression in its Select List
Example: Creating a Unique Join Index
Example: Creating a Join Index Using an Updatable CURRENT_DATE Function
Example: Altering the Partitioning of a Join Index Using ALTER TABLE TO CURRENT
Example: Creating a Join Index Defined On a Period Column
Example: Creating a Join Index With a BEGIN Expression in its Select List
Example: Creating a Join Index With a Character Partitioning Expression
Example: Partitioning Expression that Specifies an AT LOCAL Date
Example: Creating Join Indexes With a UDT Column as a Primary or Secondary Index
Example: Creating a Join Index for a Table with JSON Columns
Example: Creating Column-Partitioned Join Indexes
Example: Creating Column-Partitioned Sparse Join Index With Autocompression Based on the Default
Related Topics
CREATE HASH INDEX
CREATE HASH INDEX Syntax
CREATE HASH INDEX Syntax Elements
index
ANSI Compliance
Usage Notes
Examples
Examples for Base Table With Unique Primary Index
Example: Hash Index With Checksum
Example: Creating a Hash Index According to Order Date
Example: Creating a Hash Index According to Customer ID
Example: Creating a Hash Index According to Order Date by Order ID
Example: Creating a Hash Index According to Order Date
Example: Creating a Hash Index on Orders by Order Date
Example: Creating a Hash Index According to Order Date
Examples for Base Table With Nonunique Primary Index
Example: Creating a Hash Index According to Shipping Date
Example: Creating a Hash Index According to Part Number
Example: Creating a Hash Index According to Ship Date
Example: Creating a Hash Index According to Ship Date by Order ID
Example: Creating a Hash Index According to Ship Date
Example: Creating a Hash Index According to Ship Date by Order Number
Example: Hash Indexes With a UDT Column in their Column Lists
Related Topics
ALTER JOIN INDEX
ALTER JOIN INDEX Syntax
Usage Notes
ALTER HASH INDEX
ALTER HASH INDEX Syntax
Usage Notes
DROP INDEX
DROP INDEX Syntax
DROP INDEX Syntax Elements
index_specification
table_specification
join_index_specification
index_definition
table_specification
join_index_specification
order_clause
ANSI Compliance
Examples
Example: Dropping a Named Secondary Index
Example: Dropping a Simple Unnamed Secondary Index
Example: Dropping a Composite Unnamed Secondary Index
Related Topics
DROP JOIN INDEX
DROP JOIN INDEX Syntax
DROP JOIN INDEX Syntax Elements
ANSI Compliance
Example: Dropping a Join Index
Related Topics
DROP HASH INDEX
DROP HASH INDEX Syntax
DROP HASH INDEX Syntax Elements
ANSI Compliance
Example: Dropping a Hash Index
Related Topics
HELP INDEX
HELP INDEX Syntax
HELP INDEX Syntax Elements
ANSI Compliance
HELP INDEX Examples
Related Topics
HELP JOIN INDEX
HELP JOIN INDEX Syntax
HELP JOIN INDEX Syntax Elements
ANSI Compliance
Example: HELP JOIN INDEX on a Join Index
Related Topics
HELP HASH INDEX
HELP HASH INDEX Syntax
HELP HASH INDEX Syntax Elements
ANSI Compliance
Example: HELP HASH INDEX
Related Topics
Authorization Statements for External Routines
CREATE AUTHORIZATION and REPLACE AUTHORIZATION
CREATE AUTHORIZATION and REPLACE AUTHORIZATION Syntax
CREATE AUTHORIZATION and REPLACE AUTHORIZATION Syntax Elements
ANSI Compliance
Examples
Example: Creating a DEFINER Authorization
Example: Creating a DEFINER Authorization for an External Security Clause
Example: Creating a Default DEFINER Authorization
Example: Creating an INVOKER Authorization
Related Topics
DROP AUTHORIZATION
DROP AUTHORIZATION Syntax
DROP AUTHORIZATION Syntax Elements
ANSI Compliance
Example: Dropping an Authorization Object
Related Topics
Global and Persistent (GLOP) Data Statements
CREATE GLOP SET
CREATE GLOP SET Syntax
CREATE GLOP SET Syntax Elements
ANSI Compliance
Examples
Example: Creating a GLOP Set
Related Topics
DROP GLOP SET
DROP GLOP SET Syntax
DROP GLOP SET Syntax Elements
ANSI Compliance
Example: Dropping a GLOP Set
Related Topics
Procedure Statements
CREATE PROCEDURE and REPLACE PROCEDURE (External Form)
CREATE PROCEDURE and REPLACE PROCEDURE Syntax (External Form)
CREATE PROCEDURE and REPLACE PROCEDURE Syntax Elements (External Form)
parameter_specification
language_clause
SQL_data_access
external_data_access
parameter_style_specification
GLOP_set_name
privilege_option
code_specification
JAR_ID_specification
ANSI Compliance
Examples
Example: Creating a Procedure Using PARAMETER STYLE TD_GENERAL
Example: Creating a Procedure Using PARAMETER STYLE SQL
Example: Creating an External Procedure that Can Modify SQL Data Using CLIv2
Example: Creating a Java External Stored Procedure Using a Distinct UDT
Example: Creating a Java External Stored Procedure Using a Structured UDT
Example: Creating a Java External Stored Procedure Using a Period Data Type
Example: Creating a Java External Stored Procedure Using a Data Type of ST_Geometry
Example: Creating a Java External Stored Procedure Using an ARRAY or VARRAY Data Type
Example: Creating a Java External Stored Procedure Using a DATASET Data Type
Example: Creating a Procedure Using PARAMETER STYLE SQL
Example: Creating a Procedure Using PARAMETER STYLE TD_GENERAL
Example: Creating Java External SQL Procedures
Related Topics
CREATE PROCEDURE and REPLACE PROCEDURE (SQL Form)
CREATE PROCEDURE and REPLACE PROCEDURE Syntax (SQL Form)
CREATE PROCEDURE and REPLACE PROCEDURE Syntax Elements (SQL Form)
parameter_specification
statement
SQL_statement
SQL_multistatement_request
compound statement
open_statement
fetch_statement
assignment_statement
condition_statement
iteration_statement
diagnostic_statement
ITERATE label_name
LEAVE label_name
SQL_data_access
DYNAMIC RESULT SETS
privilege_option
local_declaration
condition_name CONDITION
cursor_declaration
PREPARE
cursor_specification
condition_handler
Usage Considerations
Rules for SQL Procedure Privileges
Privilege Violations During Procedure Compilation
Privilege Violations During Procedure Execution
Examples
Example: Creating a Procedure with Parameters of Different Data Types
Example: Specifying a SQL SECURITY—CREATOR
Example: Specifying a SQL SECURITY—DEFINER
Example: Specifying SQL SECURITY—INVOKER
Example: Specifying a SQL SECURITY—OWNER
Example: Passing the Value of for a TOP n Operator to an SQL Procedure
Example: Creating a Procedure with Local Variable, Cursor, and Conditional Handler Declarations
Example: Creating SQL Procedures With a Single Statement
Example: Using Nested Compound Statements in a Procedure
Example: Splitting a CLOB Value in Half and Inserting the Pieces into Two Different Tables
Example: Converting a CLOB Containing XML Data into Rows for Insertion into a Table
Example: Creating an SQL Procedure with a Multistatement Request
Example: Creating a Procedure with Multistatement Request Using a Dynamic SQL Call Statement
Example: Setting the Transaction Query Band Using a Parameter
Example: Creating a Procedure with Dynamic SQL Using the SQL PREPARE Statement
Example: Creating an SQL Procedure Using Condition and Iteration Statements
Example: Creating SQL Procedures Using UDTs
Example: Creating an SQL Procedure that Specifies Recursion
Example: Invoking an SQL UDF From an SQL Procedure
Example: Converting a CLOB Containing XML Data into Rows for Insertion into a Table
Example: Creating a Procedure with Parameters and Local Variables
Example: Creating a Procedure that Performs a Consume Mode SELECT
Example: Creating a Procedure that Consumes a Queue Table
ANSI Compliance
Related Topics
ALTER PROCEDURE (SQL Form)
ALTER PROCEDURE Syntax (SQL Form)
ALTER PROCEDURE Syntax Elements (SQL Form)
ANSI Compliance
Examples: ALTER PROCEDURE (SQL form)
ALTER PROCEDURE (External Form)
ALTER PROCEDURE Syntax (External Form)
ALTER PROCEDURE Syntax Elements (External Form)
procedure_name
LANGUAGE
COMPILE
AT TIME ZONE
EXECUTE PROTECTED
ANSI Compliance
Usage Considerations
Invocation Restrictions
ALTER PROCEDURE Examples (External Form)
RENAME PROCEDURE
RENAME PROCEDURE Syntax
RENAME PROCEDURE Syntax Elements
old_procedure_name
new_procedure_name
ANSI Compliance
Example: Renaming a Procedure
Related Topics
DROP PROCEDURE
DROP PROCEDURE Syntax
DROP PROCEDURE Syntax Elements
ANSI Compliance
Example: Dropping a Procedure
Related Topics
HELP PROCEDURE
HELP PROCEDURE Syntax
HELP PROCEDURE Syntax Elements
ANSI Compliance
Examples
Example: Reporting UDT Parameters
Example: Reporting ARRAY Parameters for a Procedure
Example: HELP PROCEDURE Attributes Report
Example: HELP PROCEDURE with Unicode Pass Through Set
Related Topics
Macro Statements
CREATE MACRO and REPLACE MACRO
CREATE MACRO and REPLACE MACRO Syntax
CREATE MACRO and REPLACE MACRO Syntax Elements
ANSI Compliance
CREATE MACRO and REPLACE MACRO Examples
Related Topics
RENAME MACRO
RENAME MACRO Syntax
RENAME MACRO Syntax Elements
old_macro_name
new_macro_name
ANSI Compliance
RENAME MACRO Example
Related Topics
DROP MACRO
DROP MACRO Syntax
DROP MACRO Syntax Elements
ANSI Compliance
Related Topics
HELP MACRO
HELP MACRO Syntax
HELP MACRO Syntax Elements
ANSI Compliance
Example: HELP MACRO With UDTs
Example: HELP MACRO
Related Topics
User-Defined Function Statements
CREATE FUNCTION and REPLACE FUNCTION (SQL Form)
CREATE FUNCTION and REPLACE FUNCTION Syntax (SQL Form)
CREATE FUNCTION and REPLACE FUNCTION Syntax Elements (SQL Form)
ANSI Compliance
RETURN Statement
RETURN Statement Syntax
RETURN Statement Syntax Elements
ANSI Compliance
Rules
Examples
Example: Defining an SQL UDF With a LOB Parameter
Example: Defining an SQL UDF With a Function in its RETURN Statement
Example: Defining an SQL UDF With a DateTime Expression in its RETURN Statement
Example: Defining an SQL UDF With a Period Function in its RETURN Statement
Example: Defining an SQL UDF With a Method in its RETURN Statement
Example: Defining an SQL UDF With an External UDF in its RETURN Statement
Example: Defining an SQL UDF With a Geospatial Data Type in Its RETURNS Clause and RETURN Statement
Example: Creating a Function with Geospatial Input Arguments
Example: Invoking an SQL UDF as an Argument to an External UDF
Related Topics
CREATE FUNCTION and REPLACE FUNCTION (Table Form)
CREATE FUNCTION and REPLACE FUNCTION Syntax (Table Form)
CREATE FUNCTION and REPLACE FUNCTION Syntax Elements (Table Form)
ANSI Compliance
Usage Notes
CREATE FUNCTION Examples
Example: Creating a Function from Input Arguments
Example: Creating and Using an XML Function
Example: Constant Reference Table Function
Example: Variable Reference Table Function
Example: Variable Reference Table Function Called from a Derived Table
Example: Table Function With a UDT Parameter that Returns a Column With a UDT Data Type
Example: Different LOB Specifications for Parameter and RETURNS TABLE Clauses
Example: Dynamic Result Row Specification
Example: Java Table UDF
Example: Table Operator Function Written in SAS
Example: Ordering Input Parameters to a Table Function
Example: Using a Table Function to Pass Data Between Two Vantage Systems
Related Topics
CREATE FUNCTION and REPLACE FUNCTION (External Form)
CREATE FUNCTION and REPLACE FUNCTION Syntax (External Form)
CREATE FUNCTION and REPLACE FUNCTION Syntax Elements (External Form)
parameter_specification
return_data_type
language_clause
SQL_data_access
function_attribute
code_specification
path_specification
JAR_ID_specification
ANSI Compliance
Examples
Example: Creating a UDF C Function
Example: Parsing an XML Document Using a Scalar UDF
Example: Using a UDF to Write a Message to an External Queue
Example: Retrieving Rows from the Data Dictionary and Writing Them to an External Queue on a Client System
Example: Creating and Using an EXTERNAL SECURITY Clause in a UDF
Example: Creating and Using a UDT Input Parameter Data Type in Scalar UDF Definition
Example: Creating Functions that Algorithmically Compress LOB-Related Data
Example: Creating Functions that Decompress Algorithmically Compressed LOB-Related Data
Example: Creating and Using a VARIANT_TYPE Input Parameter UDT Data Type in a UDF Definition
Example: Using the TD_ANYTYPE Parameter and RETURNS Clause Data Type in a UDF Definition
Example: Creating a Java Scalar Function
Example: Creating a Java Aggregate Function
Example: Using a One-Dimensional ARRAY in a Parameter Definition
Example: Using a Multidimensional ARRAY in a Parameter Definition
Example: Creating a Row-Level Security Function
Example: Creating a Simple Constraint UDF to Enforce No Read Up Row-Level Security
Related Topics
CREATE FUNCTION MAPPING and REPLACE FUNCTION MAPPING
CREATE FUNCTION MAPPING and REPLACE FUNCTION MAPPING Syntax
CREATE FUNCTION MAPPING and REPLACE FUNCTION MAPPING Syntax Elements
table_list
Examples
Example: Defining a Function Mapping
Example: Replacing a Function Mapping Definition
Example: Function Mapping Definition for a Function Within the Database
Example: Function Mapping Definition with IN TABLE, OUT TABLE, and Parameters Options
Example: Function Mapping Definition with IN TABLE and Parameter Options
Example: Function Mapping Definition that Includes a Variable with a Default Value
Example: Function Mapping Definition with Multiple Variable Substitutions
Example: Function Mapping with the ANY IN TABLE Option
Example: Function Mapping with Multiple ANY IN TABLE Clauses
Example: Function Mapping with (ANY) IN TABLE Clause Substitution
Example: Function Mapping Definition with IN TABLE Options
Example: Function Mapping Definition with IN TABLE Clause Substitution
Example: Function Mapping Definition with a Substitution in the OUT TABLE Clause
Example: Function Mapping Definition with Scalar Subquery (SSQ) Substitution
Example: Function Mapping with Scalar Subquery (SSQ) Substitution that Includes a System Variable
Example: Function Mapping with Concatenated Variable Substitution
Example: Function Mapping for READ_NOS
ALTER FUNCTION
ALTER FUNCTION Syntax
ALTER FUNCTION Syntax Elements
Usage Considerations
Using ALTER FUNCTION or REPLACE FUNCTION with Row-Level Security UDFs
ALTER FUNCTION Examples
ANSI Compliance
DROP FUNCTION
DROP FUNCTION Syntax
DROP FUNCTION Syntax Elements
ANSI Compliance
Usage Notes
DROP FUNCTION Examples
Related Topics
DROP FUNCTION MAPPING
DROP FUNCTION MAPPING Syntax
DROP FUNCTION MAPPING Syntax Elements
Examples
Example: Dropping a Function Mapping
HELP FUNCTION
HELP FUNCTION Syntax
HELP FUNCTION Syntax Elements
SPECIFIC FUNCTION
FUNCTION
ANSI Compliance
Examples
Example: HELP FUNCTION Report
Example: HELP FUNCTION Report for a UDF
Example: Displaying UDT Parameters
Example: Displaying Multidimensional ARRAY Parameters
Example: VARIANT_TYPE Input Parameter Data Type
Example: TD_ANYTYPE Input and Output Parameter Data Type
Example: Displaying a Java UDF with Array and Period Data Types
Related Topics
RENAME FUNCTION (SQL Form)
RENAME FUNCTION Syntax (SQL Form)
RENAME FUNCTION Syntax Elements (SQL Form)
ANSI Compliance
RENAME FUNCTION Examples (SQL Form)
Related Topics
RENAME FUNCTION (External Form)
RENAME FUNCTION Syntax (External Form)
RENAME FUNCTION Syntax Elements (External Form)
ANSI Compliance
Example 1: Renaming the Specific Name for a Function
Example 2: Renaming the Overloaded Calling Name for a Function
Related Topics
SHOW FUNCTION MAPPING
SHOW FUNCTION MAPPING Syntax
SHOW FUNCTION MAPPING Syntax Elements
IN XML
function_mapping_name
Examples
Example: Showing a Function Mapping Definition
Example: Showing the Definition of a Function Mapping in XML Format
User-Defined Method Statements
CREATE METHOD
CREATE METHOD Syntax
CREATE METHOD Syntax Elements
locator_specification
item_list
ANSI Compliance
CREATE METHOD Examples
Example: Creating a Constructor Method for a UDT
Example: Creating a Method Named in_state for a UDT Named address
Example: Creating a Method Named timezone for a UDT Named address
Example: Creating an Instance Method Using a One-Dimensional ARRAY Type and an SQL Parameter Type
Example: Creating an Instance Method Using a One-Dimensional ARRAY Type and a TD_GENERAL Parameter Type
Example: Creating an Instance Method Using a Multidimensional ARRAY Type and an SQL Parameter Type
Example: Creating an Instance Method Using a Multidimensional ARRAY Type and a TD_GENERAL Parameter Type
Example: Methods That Return a TD_ANYTYPE or INTEGER Data Type
Example: Creating an Instance Method for a UDT Stored on the Client
Related Topics
ALTER METHOD
ALTER METHOD Syntax
ALTER METHOD Syntax Elements
specific_method_clause
method_clause
ANSI Compliance
ALTER METHOD Examples
REPLACE METHOD
REPLACE METHOD Syntax
REPLACE METHOD Syntax Elements
specific_method_clause
method_clause
item_list
S_or_C_item
ANSI Compliance
Usage Considerations
How REPLACE METHOD And CREATE METHOD Differ
Example: Replacing a Method Definition Using Its Specific Method Name
Related Topics
HELP METHOD
HELP METHOD Syntax
HELP METHOD Syntax Elements
ANSI Compliance
HELP METHOD Examples
Example: HELP METHOD with Sample Output
Example: TD_ANYTYPE Input Parameter Data Type
Example: HELP METHOD
Related Topics
User-Defined Type Statements
CREATE TYPE (Structured Form)
CREATE TYPE Syntax (Structured Form)
CREATE TYPE Syntax Elements (Structured Form)
attribute_specification
method_specification
parameter_specification
returns_parameter_specification
type_attribute
language_clause
SQL_data_access
ANSI Compliance
Examples
Example: Creating a Structured UDT with 2 Attributes
Example: Creating a Structured UDT from Predefined Data Types
Related Topics
CREATE TYPE (Distinct Form)
CREATE TYPE Syntax (Distinct Form)
CREATE TYPE Syntax Elements (Distinct Form)
method_specification
parameter_specification
returns_parameter_specification
type_attribute
language_clause
SQL_data_access
ANSI Compliance
CREATE TYPE Examples (Distinct Form)
Related Topics
CREATE TYPE (ARRAY/VARRAY Form)
CREATE TYPE Syntax (ARRAY/VARRAY Form)
CREATE TYPE Syntax Elements (ARRAY/VARRAY Form)
One-Dimensional ARRAY - Teradata Form
One-Dimensional VARRAY - Oracle-Compatible Form
Multidimensional Array - Teradata Form
Multidimensional Array - Oracle-Compatible Form
ANSI Compliance
Examples
Example: One-Dimensional ARRAY Type
Example: UDT and a One-Dimensional ARRAY Type
Example: Three-Dimensional ARRAY Type
Example: Three-Dimensional ARRAY Type Using Different Syntax
Example: Three-Dimensional VARRAY Type
Example: Three-Dimensional ARRAY and VARRAY Types With a Negative Lower Bound on a Dimension
Related Topics
CREATE storage_format SCHEMA
CREATE storage_format SCHEMA Syntax
Syntax Elements
Examples
Example: Schema for DATASET Type with Avro Storage Format
Example: Schema for DATASET Type with CSV Storage Format
Usage Notes
Schemas are Converted to UTF-8
CREATE CAST and REPLACE CAST
CREATE CAST and REPLACE CAST Syntax
CREATE CAST and REPLACE CAST Syntax Elements
source_predefined_data_type
target_predefined_data_type
specific_method
METHOD
specific_function
FUNCTION
AS ASSIGNMENT
ANSI Compliance
CREATE CAST and REPLACE CAST Examples
Related Topics
CREATE ORDERING and REPLACE ORDERING
CREATE ORDERING and REPLACE ORDERING Syntax
CREATE ORDERING and REPLACE ORDERING Syntax Elements
UDT_name
method_specification
function_specification
ANSI Compliance
CREATE ORDERING and REPLACE ORDERING Examples
Example: Order Mapping for a UDT using a UDF
Example: Order Mapping for a UDT using a Method
Example: Order Mapping for a UDT using a Method
Related Topics
CREATE TRANSFORM and REPLACE TRANSFORM
CREATE TRANSFORM and REPLACE TRANSFORM Syntax
CREATE TRANSFORM and REPLACE TRANSFORM Syntax Elements
transform_specification
to_method_or_function
from_method_or_function
TO SQL WITH SPECIFIC METHOD specific_method_name
TO SQL WITH METHOD method_name
TO SQL WITH SPECIFIC FUNCTION specific_function_name
TO SQL WITH FUNCTION function_name
FROM SQL WITH SPECIFIC specific_method_name
FROM SQL WITH METHOD method_name
FROM SQL WITH SPECIFIC FUNCTION specific_function_name
FROM SQL WITH FUNCTION function_name
ANSI Compliance
CREATE TRANSFORM and REPLACE TRANSFORM Examples
Related Topics
SET TRANSFORM GROUP FOR TYPE
SET TRANSFORM GROUP FOR TYPE Syntax
SET TRANSFORM GROUP FOR TYPE Syntax Elements
UDT_name
transform_group
ANSI Compliance
Examples
Examples: Setting Transform Groups for UDTs
Usage Notes
JSON and XML in MultipartRecord Mode
ALTER TYPE
ALTER TYPE Syntax
ALTER TYPE Syntax Elements
UDT_name
ADD ATTRIBUTE attribute_name
DROP ATTRIBUTE attribute_name
ADD METHOD
ADD SPECIFIC METHOD
DROP INSTANCE METHOD
DROP CONSTRUCTOR METHOD
DROP SPECIFIC METHOD SYSUDTLIB.specific_method_name
ANSI Compliance
Examples
Example: Using the ALTER TYPE Statement with the COMPILE Option
Example: Using the ALTER TYPE Statement with the COMPILE ONLY Option
Example: Adding an Attribute to a Structured UDT
Example: Adding Multiple Attributes to a Structured UDT
Example: Adding Multiple Instance Methods to a Structured UDT
Example: Adding an Instance Method to a Structured UDT
Example: Dropping an Attribute From a Structured UDT
Example: Dropping a Method From a Structured UDT Using Its Specific Method Name
Related Topics
DROP TYPE
DROP TYPE Syntax
DROP TYPE Syntax Elements
ANSI Compliance
DROP TYPE Examples
Related Topics
DROP storage_format SCHEMA
DROP storage_format SCHEMA Syntax
DROP storage_format SCHEMA Example
DROP CAST
DROP CAST Syntax
DROP CAST Syntax Elements
source_data_type
target_data_type
ANSI Compliance
DROP CAST Examples
Related Topics
DROP ORDERING
DROP ORDERING Syntax
DROP ORDERING Syntax Elements
ANSI Compliance
DROP ORDERING Examples
Related Topics
DROP TRANSFORM
DROP TRANSFORM Syntax
DROP TRANSFORM Syntax Elements
ANSI Compliance
DROP TRANSFORM Examples
Related Topics
HELP TYPE
HELP TYPE Syntax
HELP TYPE Syntax Elements
ANSI Compliance
Usage Considerations
HELP COLUMN Report on a Unicode View Differs From a Compatibility View
HELP TYPE Examples
Example: HELP TYPE with No Options Specified
Example: HELP TYPE for a Distinct UDT Type
Example: HELP TYPE for a UDT with the ATTRIBUTE Option
Example: HELP TYPE with METHOD Option
Example: HELP TYPE for a One-Dimensional ARRAY
Example: HELP TYPE for an ARRAY with the ATTRIBUTE Option
Example: HELP TYPE with No Options for a One-Dimensional Array
Related Topics
HELP storage_format SCHEMA
HELP storage_format SCHEMA Syntax
HELP storage_format SCHEMA Example
HELP CAST
HELP CAST Syntax
HELP CAST Syntax Elements
ANSI Compliance
HELP CAST Examples
Related Topics
HELP TRANSFORM
HELP TRANSFORM Syntax
HELP TRANSFORM Syntax Elements
ANSI Compliance
Examples
Example: HELP TRANSFORM for a UDT
Related Topics
Database Statements
CREATE DATABASE
CREATE DATABASE Syntax
CREATE DATABASE Syntax Elements
name
FROM database_name
PERMANENT
SPOOL
TEMPORARY
ACCOUNT = ‘account_string’
DEFAULT MAP
Usage Notes
Secure Zones and Sparse Maps
Journal Tables and the Default Map
FALLBACK PROTECTION
JOURNAL
AFTER JOURNAL
DEFAULT JOURNAL TABLE
ANSI Compliance
CREATE DATABASE Examples
Example: Creating a New Database
Example: Using a Constant Expression to Specify the PERM, SPOOL, and TEMPORARY Space for a Database
Example: Creating a Database with a Permanent Space Skew Limit
Example: Creating a Database with a Spool Space Skew Limit
Example: Creating a Database with a Temporary Space Skew Limit
Example: Creating a Database with Fallback and Journaling
DELETE DATABASE
DELETE DATABASE Syntax
DELETE DATABASE Syntax Elements
ANSI Compliance
Example: Deleting a Database
Related Topics
MODIFY DATABASE
MODIFY DATABASE Syntax
MODIFY DATABASE Syntax Elements
database_name
AS
PERMANENT
TEMPORARY
SPOOL
ACCOUNT
DEFAULT MAP
Usage Notes
Secure Zones and Sparse Maps
Journal Tables and the Default Map
FALLBACK
JOURNAL
AFTER JOURNAL
DEFAULT JOURNAL TABLE
ANSI Compliance
MODIFY DATABASE Examples
Example: Change Permanent Space Allocation
Example: Use Constant Expression to Modify PERM, SPOOL, and TEMPORARY Database Spaces
Example: Add Permanent Space Skew Limit to Database
Example: Add Temporary Space Skew Limit to Database
Example: Add Spool Space Skew Limit to Database
Example: Change Fallback Protection and Space Allocation
Example: Change Default Journal Table
Example: Drop Default Journal Table
Example: Define New Default Journal Table
Related Topics
DATABASE
DATABASE Syntax
DATABASE Syntax Elements
ANSI Compliance
Example: Defining Default Database for Current Session
Related Topics
DROP DATABASE
DROP DATABASE Syntax
DROP DATABASE Syntax Elements
Usage Considerations
Dropping a Populated Database
ANSI Compliance
Example: Dropping Empty Database
Related Topics
HELP DATABASE
HELP DATABASE Syntax
HELP DATABASE Syntax Elements
ANSI Compliance
HELP DATABASE Examples
Example: HELP DATABASE
Example: HELP DATABASE Output Showing a UDT and a Method
Example: Output with a UIF
Related Topics
LOGGING INCREMENTAL ARCHIVE ON FOR object_list
LOGGING INCREMENTAL ARCHIVE ON FOR object_list Syntax
LOGGING INCREMENTAL ARCHIVE ON FOR object_list Syntax Elements
Examples
Examples: Enable Incremental Restore
LOGGING INCREMENTAL ARCHIVE OFF FOR object_list
LOGGING INCREMENTAL ARCHIVE OFF FOR object_list Syntax
LOGGING INCREMENTAL ARCHIVE OFF FOR object_list Syntax Elements
Examples
Examples: Disabling Incremental Restore
INCREMENTAL RESTORE ALLOW WRITE FOR object_list
INCREMENTAL RESTORE ALLOW WRITE FOR object_list Syntax
INCREMENTAL RESTORE ALLOW WRITE FOR object_list Syntax Elements
Examples
Examples: Enable Read and Write Access After an Incremental Restore
User, Profile, and Role Statements
CREATE PROFILE
CREATE PROFILE Syntax
CREATE PROFILE Syntax Elements
profile_name
ACCOUNT
DEFAULT MAP
Usage Notes
Secure Zones and Sparse Maps
DEFAULT DATABASE = database_name
SPOOL
TEMPORARY
PASSWORD
QUERY_BAND
IGNORE QUERY_BAND VALUES
TRANSFORM
COST PROFILE = cost_profile_name
CONSTRAINT
ANSI Compliance
Usage Considerations
Effects of Profile-Based Password Controls
Working with the SPECCHAR Password Control
Specifying the Single-Letter Code to Define SpecChar Rules
Default Value
Effects of Object Naming on SPECCHAR Controls
CREATE PROFILE Examples
Example: Creating Profile that Defines Default Database
Example: Using Constant Expression to Specify SPOOL Space for Profile
Example: Using Constant Expression to Specify TEMPORARY Space for Profile
Example: Creating Profile that Defines User-Level Password Security Attribute
Example: Set Profile Query Band Pairs as Default
Example: Profile Query Band Pairs Are Not Default
Example: Creating Profile to Set Default Query Band Value and Query Band Value to Ignore
Example: Creating Profile with System Default Query Band Value and Query Band Value to Ignore
Example: Creating Profile that Ignores pair-name with Any pair-value
Example: Adding UDT Transform Groups to Profile
Example: Assigning Row-Level Security Constraint Classifications to Profile
Related Topics
MODIFY PROFILE
MODIFY PROFILE Syntax
MODIFY PROFILE Syntax Elements
profile_name
ACCOUNT
DEFAULT MAP
Usage Notes
Secure Zones and Sparse Maps
DEFAULT DATABASE
SPOOL
TEMPORARY
PASSWORD
QUERY_BAND
IGNORE QUERY_BAND VALUES
TRANSFORM
COST PROFILE
CONSTRAINT
ANSI Compliance
MODIFY PROFILE Examples
Example: Modify profile spool space
Example: Using a Constant Expression to Specify the SPOOL Space for a Profile
Example: Using Constant Expression to Specify TEMPORARY Space for Profile
Examples: QUERY_BAND
Example: Modifying Profile to Set Default Query Band Value and Query Band Value to Ignore
Example: Adding UDT Transform Groups to Profile
Example: Removing UDT Transform Groups from Profile
Related Topics
CREATE ROLE
CREATE ROLE Syntax
CREATE ROLE Syntax Elements
ANSI Compliance
Example: Creating an External Role
Related Topics
CREATE USER
CREATE USER Syntax
CREATE USER Syntax Elements
user_name
AS
PERMANENT
PASSWORD
STARTUP
TEMPORARY
SPOOL
DEFAULT DATABASE
COLLATION
ACCOUNT
DEFAULT MAP
Usage Notes
Journal Tables and the Default Map
FALLBACK
JOURNAL
AFTER JOURNAL
DEFAULT JOURNAL TABLE
TIME ZONE
DATEFORM
DEFAULT CHARACTER SET
DEFAULT ROLE
PROFILE
TRANSFORM
DBA
CONSTRAINT
EXPORTWIDTH
ANSI Compliance
Usage Considerations
Privileges Received by the Creator
Privileges Granted Automatically to a Created User
Privileges Not Granted Automatically
Collation Option Usage
MULTINATIONAL Collation
Valid Export Width Specifications
Compatibility Mode
Expected Mode
Maximum Mode
DEFAULT Mode
Effects of Shift Out and Shift In Characters on Export Widths
CREATE USER Examples
Example: Creating an Administrative User
Example: Using Constant Expression to Specify PERM, SPOOL, and TEMPORARY Space for User
Example: Creating User with Permanent Space Skew Limit
Example: Creating User with Temporary Space Skew Limit
Example: Creating User with Spool Space Skew Limit
Example: Creating User Using TIME ZONE=’time_zone_string’
Example: Create User that Includes UDT Transforms
Example: Creating Users With Row-Level Security Constraints
Example: Creating New User With EXPECTED Export Width Table Name
Related Topics
MODIFY USER
MODIFY USER Syntax
MODIFY USER Syntax Elements
user_name
PERMANENT
STARTUP
PASSWORD
RELEASE PASSWORD LOCK
TEMPORARY
SPOOL
ACCOUNT
DEFAULT MAP
Usage Notes
Secure Zones and Sparse Maps
Journal Tables and the Default Map
DEFAULT DATABASE
COLLATION
FALLBACK
JOURNAL
AFTER JOURNAL
DEFAULT JOURNAL TABLE
DROP DEFAULT JOURNAL TABLE
TIME ZONE
DATEFORM
DEFAULT CHARACTER SET
DEFAULT ROLE
PROFILE
TRANSFORM
DBA
EXPORTWIDTH
CONSTRAINT
Usage Notes
Valid Export Width Specifications
Compatibility Mode
Expected Mode
Maximum Mode
DEFAULT Mode
Effects of Shift Out and Shift In Characters on Export Widths
ANSI Compliance
MODIFY USER Examples
Example: Modifying Permanent Space Allocation for User
Example: Modifying PERM, SPOOL, and TEMPORARY Space Using Constant Expression
Example: Modifying User to Add Permanent Space Skew Limit
Example: Modifying Password, Spool Allocation, Startup String, and Default Database
Example: Modifying User to Add Temporary Space Skew Limit
Example: Modifying User to Add Spool Space Skew Limit
Example: Modifying Default Database and Password for User
Example: Modifying Default Journal Table for User
Example: Changing Default Journal Table
Example: Modifying Time Zone Displacement with TIME ZONE LOCAL Option
Example: Modifying Time Zone Displacement with TIME ZONE time_zone_string Option
Example: Assigning Profile to User with PROFILE Option
Example: Adding UDT Transform Groups to User
Example: Removing UDT Transform Groups from User
Example: Adding or Dropping Security Constraint Assignments in MODIFY USER Statement
Related Topics
SET ROLE
SET ROLE Syntax
SET ROLE Syntax Elements
ANSI Compliance
SET ROLE Examples
Related Topics
DELETE USER
DELETE USER Syntax
DELETE USER Syntax Elements
ANSI Compliance
Example: Deleting Database Objects from User
Related Topics
DROP PROFILE
DROP PROFILE Syntax
DROP PROFILE Syntax Elements
Effects of Dropping a Profile
ANSI Compliance
Example: Dropping Profile
Related Topics
DROP ROLE
DROP ROLE Syntax
DROP ROLE Syntax Elements
ANSI Compliance
DROP ROLE Examples
Related Topics
DROP USER
DROP USER Syntax
DROP USER Syntax Elements
Effects of Dropping a User on Database Privileges
Effects of Dropping a User on User-Created Roles and Profiles
ANSI Compliance
DROP USER Examples
Related Topics
HELP USER
HELP USER Syntax
HELP USER Syntax Elements
ANSI Compliance
HELP USER Example
Related Topics
Map Statements
CREATE MAP
CREATE MAP Syntax
CREATE MAP Example
DROP MAP
DROP MAP Syntax
DROP MAP Example
SHOW MAP
SHOW MAP Syntax
SHOW MAP Examples
Load Isolation Statements
BEGIN ISOLATED LOADING
BEGIN ISOLATED LOADING Syntax
BEGIN ISOLATED LOADING Examples
LDILoadGroup Query Band
LDILoadGroup Query Band Examples
CHECKPOINT ISOLATED LOADING
CHECKPOINT ISOLATED LOADING Syntax
CHECKPOINT ISOLATED LOADING Example
END ISOLATED LOADING
END ISOLATED LOADING Syntax
END ISOLATED LOADING Example
Secure Zones Statements
CREATE ZONE
CREATE ZONE Syntax
CREATE ZONE Syntax Elements
CREATE ZONE Examples
ALTER ZONE
ALTER ZONE Syntax
ALTER ZONE Syntax Elements
ALTER ZONE Examples
DROP ZONE
DROP ZONE Syntax
DROP ZONE Syntax Elements
DROP ZONE Example
Session Statements
SET SESSION
SET SESSION Syntax
Using SET SESSION Statements with Connection Pooling
SET SESSION ACCOUNT
SET SESSION ACCOUNT Syntax
SET SESSION ACCOUNT Syntax Elements
ANSI Compliance
Example: Setting the Account to Change Resource Charges for a Session
Example: Setting the Account to Change the Priority for a Request
Related Topics
SET SESSION CALENDAR
SET SESSION CALENDAR Syntax
SET SESSION CALENDAR Syntax Elements
ANSI Compliance
Example: Changing the Default Session Calendar Using SET SESSION CALENDAR
Example: Changing the Default Session Calendar Using CREATE USER
Related Topics
SET SESSION CHARACTER SET UNICODE PASS THROUGH
SET SESSION CHARACTER SET UNICODE PASS THROUGH Syntax
Syntax Elements
Example: Enabling Unicode Pass Through for the Session
ANSI Compliance
SET SESSION COLLATION
SET SESSION COLLATION Syntax
SET SESSION COLLATION Syntax Elements
ASCII
CHARSET_COLL
EBCDIC
HOST
JIS_COLL
MULTINATIONAL Collation
Usage Notes
ANSI Compliance
SET SESSION COLLATION Examples
Example: Setting a Session to Use the ASCII Collation Sequence
Example: Effect of the ASCII Collation Sequence on SQL Report Output
Example: Setting a Session to Use the EBCDIC Collation Sequence
Example: Effect of the EBCDIC Collation Sequence on SQL Report Output
Related Topics
SET SESSION CONSTRAINT
SET SESSION CONSTRAINT Syntax
SET SESSION CONSTRAINT Syntax Elements
Rules for Determining Whether Profile Defaults or User Defaults Are Assigned as Session Row-Level Security Defaults
Using SET SESSION CONSTRAINT To Modify the Constraints Assigned to You for the Current Session
Using the NULL Option for SET SESSION CONSTRAINT
Determining the Session Constraint Values
Session Constraint Values for Permanent Database Users
Session Constraint Values for Directory Users
Session Constraint Values for Application Pooled Users
Session Constraint Values for Trusted User Applications and Proxy Users
Session Constraint Values in OVERRIDE Sessions
Specifying Non-Hierarchical Constraint Values when Loading Tables
Using SET SESSION to Change the Session Security Constraint Value
Using HELP SESSION to Investigate Session Constraint Values
ANSI Compliance
SET SESSION CONSTRAINT Examples
Constraint Definitions for the Examples
Example: Changing the Security Level and Category for a Session
Example: Changing the Row-Level Security Level for a Session
Example: Changing the Row-Level Security Category for a Session
Example: Loading Tables without User OVERRIDE Privileges
Example: Loading Tables with User OVERRIDE Privileges
Related Topics
SET SESSION DATABASE
SET SESSION DATABASE Syntax
SET SESSION DATABASE Syntax Elements
ANSI Compliance
Example
Session Database and Called Procedures
SET SESSION DATEFORM
SET SESSION DATEFORM Syntax
SET SESSION DATEFORM Syntax Elements
ANSI Compliance
Usage Considerations
Session Dateform and Called Procedures
SET SESSION DATEFORM Examples
SET SESSION DEBUG FUNCTION
SET SESSION DEBUG FUNCTION Syntax
SET SESSION DEBUG FUNCTION Examples
SET SESSION DOT NOTATION
SET SESSION DOT NOTATION Syntax
Example: Default Response for 15.0 and 15.10 Dot Notation
SET SESSION FOR ISOLATED LOADING
SET SESSION FOR ISOLATED LOADING Syntax
SET SESSION FOR ISOLATED LOADING Examples
SET SESSION FUNCTION TRACE
SET SESSION FUNCTION TRACE Syntax
SET SESSION FUNCTION TRACE Syntax Elements
ANSI Compliance
SET SESSION FUNCTION TRACE Example
Related Topics
SET SESSION JSON IGNORE ERRORS
SET SESSION JSON IGNORE ERRORS Syntax
SET SESSION JSON IGNORE ERRORS Syntax Elements
ANSI Compliance
Example: Disabling JSON Data Validation
Related Topics
SET SESSION SEARCHUIFDBPATH
SET SESSION SEARCHUIFDBPATH Syntax
SET SESSION SEARCHUIFDBPATH Syntax Elements
ANSI Compliance
Example: Setting the Database UIF Search Path
SET SESSION TRANSACTION ISOLATION LEVEL
SET SESSION TRANSACTION ISOLATION LEVEL Syntax
isolation_level
ANSI Compliance
SET SESSION TRANSACTION ISOLATION LEVEL Examples
Related Topics
SET QUERY_BAND
SET QUERY_BAND Syntax
SET QUERY_BAND Syntax Elements
pair_name
pair_value
NONE
UPDATE
FOR SESSION
FOR TRANSACTION
ANSI Compliance
Usage Considerations
About Query Banding and Middle Tier Applications
Query Banding for Pooled Sessions
Query Banding for Trusted Sessions
Preventing Unauthorized Use of Query Banding by Proxy Users
Creator Status for Objects Created in a Trusted Session
Query Bands and Row-Level Security Constraints
SET QUERY_BAND FOR SESSION, Proxy Users, and the Deletion of Volatile and Global Temporary Tables
Examples
Example: Setting a Query Band For a Session
Example: Making a Proxy User Connection
Example: Setting the Role for a Trusted Session Using a PROXYROLE name:value Pair
Example: Using the BLOCKCOMPRESSION Reserved Query Band
Example: Setting TVSTEMPERATURE Query Bands to VERYHOT
Example: Setting TVSTEMPERATURE Query Bands
Example: Setting BLOCKCOMPRESSION and TVSTEMPERATURE Query Bands
Example: Setting a Query Band That Specifies the EQUALS SIGN Character as Part of the Value
Example: Removing a Query Band From a Session
Example: Query Band UPDATE Examples
Example: Setting a Query Band Using FOR SESSION VOLATILE
Example: Using UPDATE With a FOR SESSION VOLATILE Query Band
Example: Setting a Query Band for the Current Transaction
Example: Removing a Query Band From the Current Transaction
Example: Using SET QUERY_BAND … FOR TRANSACTION As a Parameterized JDBC Request
Example: Preventing an Injected SET QUERY_BAND from Changing the Proxy User
Example: Initiating a Trusted Session Using a Transaction Query Band
Example: Setting a Query Band for the Current Transaction for a Multistatement Request in a Trusted Session
Related Topics
SET TIME ZONE
SET TIME ZONE Syntax
SET TIME ZONE Syntax Elements
LOCAL
USER
expression
quotestring
time_zone_string
ANSI Compliance
SET TIME ZONE Examples
SET SESSION UDFSEARCHPATH
SET SESSION UDFSEARCHPATH Syntax
ANSI Compliance
Example: SET SESSION UDFSEARCHPATH
HELP SESSION
HELP SESSION Syntax
HELP SESSION Syntax Elements
ANSI Compliance
Usage Notes
Examples
Example: HELP SESSION for the Current User
Example: HELP SESSION for a KanjiEBCDIC user
Example: HELP SESSION for Session Attributes
Example: Row-Level Security Constraints Only
Example: Additional Object Name and Title Fields Returned with HELP SESSION
Example: Show SEARCHUIFDBPATH
Example: HELP SESSION with Unicode Pass Through Set
Related Topics
Logging Statements
BEGIN LOGGING
BEGIN LOGGING Syntax
BEGIN LOGGING Syntax Elements
DENIALS
WITH TEXT
Logging Frequency
FOR CONSTRAINT constraint_name
ALL
operation
GRANT
BY user_name
Object for which to Log Access
ANSI Compliance
Usage Considerations
About Logging
Logging of External Users
Determining the Object Level for a BEGIN LOGGING Request
Requirements for Logging Certain Operations and Objects in Combination
Logging MODIFY Statements
Logging Self-Referent MODIFY USER Statements
Examples
Example: Using BEGIN LOGGING
Example: Logging UDTs
Example: Logging UDTs with SQL Text
Example: Logging on First UDT Method with SQL Text
Example: Logging UDTs with Insufficient Privileges in SYSUDTLIB
Example: Logging UDTs with Insufficient Privileges on a UDT
Example: Column-Level Discretionary Access Control and Row-Level Security Audit Logging
Example: Logging Denials for a Row-Level Security Constraint
Example: Logging the Denied First Insert Into a Row-Level Security-Secured Table
Example: Logging the Denial of an Attempt to Archive a Row-Level Security-Secured Table by a User Not Having Archive Access to the Table
Related Topics
BEGIN QUERY CAPTURE
BEGIN QUERY CAPTURE Syntax
BEGIN QUERY CAPTURE Syntax Elements
FOR INDEX_ANALYSIS
WITH
INTO qcd_name
AS WORKLOAD workload_name
ANSI Compliance
Example: Using the Default TDQCD Database to Capture and Store a Query Plan in XML Format
Example: Capturing a Mix of DML and DDL Requests in XML Format Using BEGIN QUERY CAPTURE
Related Topics
BEGIN QUERY LOGGING
BEGIN QUERY LOGGING Syntax
BEGIN QUERY LOGGING Syntax Elements
WITH
MODE = m
LIMIT
ON
ANSI Compliance
Examples
Example: Logging All Users for All Accounts
Example: Logging Up To 1,000 SQL Text Characters in DBQLogTbl
Example: Logging Specific Users
Example: Handling Short Queries
Example: Logging All Users Who Are Logged On Under Specific Accounts
Example: Logging Requests by Summary Completion Time in Full Second Intervals
Example: Logging Requests by Summary Completion Time in Subsecond Intervals
Example: Short Requests Based on CPU Time
Example: Short Requests Based on I/O Counts
Example: Logging Requests by Threshold Normalized CPU Times
Example: Logging Requests on All Users for the Default Table
Example: Disabling Query Logging for MultiLoad Jobs
Example: Logging Requests Except for a Single User and Account
Example: Invoking and Disabling Query Logging for a Rule Set
Example: Fine Tuning Query Logging Rules
Example: Logging Plans as XML Text
Example: Logging Plans as XML Text for Detailed Statistics
Example: Logging Verbose EXPLAIN as XML Text
Example: Logging Statistics Usage for All Requests by a User
Example: Logging an XML Plan with VERBOSE EXPLAIN and DETAILED STATSUSAGE Collections
Example: Logging an XML Plan with VERBOSE EXPLAIN and DETAILED STATSUSAGE Collections in the Same Request
Example: Logging Object Use Counts on a Specified Database
Example: Logging Object Use Counts on a Mix of Databases and Users
Related Topics
FLUSH QUERY LOGGING
FLUSH QUERY LOGGING Syntax
FLUSH QUERY LOGGING Syntax Elements
flush_option
ANSI Compliance
FLUSH QUERY LOGGING Examples
Related Topics
REPLACE QUERY LOGGING
REPLACE QUERY LOGGING Syntax
REPLACE QUERY LOGGING Syntax Elements
WITH
MODE=m
LIMIT
Unit of Time
ON
ANSI Compliance
Related Topics
END LOGGING
END LOGGING Syntax
END LOGGING Syntax Elements
DENIALS
WITH TEXT
operation_specification
constraint_name
user_name
logged_item
ANSI Compliance
END LOGGING Examples
Related Topics
END QUERY CAPTURE
END QUERY CAPTURE Syntax
Usage Considerations
Rules and Restrictions for END QUERY CAPTURE
ANSI Compliance
Related Topics
END QUERY LOGGING
END QUERY LOGGING Syntax
END QUERY LOGGING Syntax Elements
END QUERY LOGGING Examples
Example: Removing the ALL rule from the rule cache and DBC.DBQLRulesTbl
Example: Remove all DBQL rules in effect from DBC.DBQLRuleTbl
Example: Specify an account explicitly to discontinue request logging
Example: Removing the rule for user_1 from the rule cache and DBC.DBQLRulesTbl
Example: Removing the rule for user_1 and user_2 from the rule cache and DBC.DBQLRulesTbl
ANSI Compliance
Related Topics
SHOW QUERY LOGGING
SHOW QUERY LOGGING Syntax
SHOW QUERY LOGGING Syntax Elements
ANSI Compliance
Usage Considerations
Alternative Method for Listing Query Logging Rules
Rules Hierarchy for SHOW QUERY LOGGING
Examples
Example: SHOW QUERY LOGGING for Simple Conditions
Example: Report a DBQL Rule That Logs All Users for Any Account String
Example: Report a DBQL Rule That Logs All Users for a Specific Account
Example: Report a DBQL Rule That Logs a Specific User for a Specific Account
Example: Report a DBQL Rule That Logs a Specific User for a Specific Account
Example: Report a DBQL Rule That Logs a Specific User for All Accounts
Example: Report the DBQL Logging Rule for the MultiLoad Utility
Example: Searching Multiple Levels of the DBQL Rules Hierarchy
Example: Report a DBQL Rule That Logs All Users for All Accounts Using Default Logging
Example: Report a DBQL Rule That Logs a Specific User for All Accounts
Example: Report a DBQL Rule That Logs a Specific User for a Specific Account
Example: Report a DBQL Rule That Logs All Users for a Specific Account
Example: Report a DBQL Rule That Logs a Specific User for a Specific Account
Example: Report a DBQL Rule That Logs a Specific User for a Specific Account
Example: Report a DBQL Rule That Logs a Specific User for Any Account
Example: Report a DBQL Rule That Logs All Queries for the MultiLoad Utility
Example: Report a DBQL Rule That Shows SQL, StepInfo, and FeatureInfo Options Enabled
Statistics Statements
COLLECT STATISTICS (Optimizer Form)
COLLECT STATISTICS Syntax (Optimizer Form)
COLLECT STATISTICS Syntax Elements (Optimizer Form)
SUMMARY
USING Clause
INDEX
COLUMN
ON Clause
FROM Clause
ANSI Compliance
Examples
Example: Collecting Full Statistics
Example: Collecting Sampled Statistics
Example: Collecting Sampled Statistics
Example: Collecting SUMMARY Statistics
Example: Recollecting Statistics Without Specifying Thresholds
Example: A Simple Recollect Statistics Request Using the THRESHOLD Option
Example: Using the THRESHOLD Option to Recollect Statistics
Example: Collecting Statistics on Multiple Columns
Example: Collecting Single-Column PARTITION Statistics
Example: Collecting Multicolumn PARTITION Statistics
Example: Collecting Statistics on a Single-Column with an Expression
Example: Collecting Statistics on Multiple Columns with an Expression
Example: Collecting Statistics on a Constant Expression
Example: Collecting Statistics on Expressions Using Statistics Names
Example: Collecting Statistics on Built-In Function Expressions
Example: Collecting Statistics on a Geospatial Column
Example: Collecting Statistics on a Geospatial Index
Example: Collecting Statistics on Named Indexes
Example: Collecting Statistics on an Unnamed Indexes
Example: Copying Statistics From a Source Table to an Identical Target Table
Example: Collecting Sampled Statistics with USING Options
Example: Recollecting Statistics When Statistics Were First Collected Specifying a USING Clause
Example: Overriding USING Options With the FOR CURRENT Option
Example: Collecting Statistics on a Foreign Table Column
Related Topics
SHOW STATISTICS
SHOW STATISTICS Syntax
SHOW STATISTICS Syntax Elements
IN XML
CURRENT
SUMMARY
VALUES
Example: SHOW SUMMARY STATISTICS with VALUES Clause
COLUMN
AS statistics_name
INDEX
ORDER BY
ON Clause
FROM Clause
Example: Reporting Detailed QCD Statistics
ANSI Compliance
Usage Considerations
Response Sequences for Detailed Statistics (Single Record and Indicator Modes)
Response Sequences for Detailed Statistics (Multiple Records and Indicator Modes)
Rules and Guidelines for SHOW STATISTICS Requests
Examples
Example: SHOW STATISTICS for COLLECT STATISTICS SQL Text Only
Example: SHOW STATISTICS SEQUENCED Option
Example: SHOW STATISTICS with a VALUES Clause for a Table With Statistics Collected on a Geospatial Column
Related Topics
DROP STATISTICS (Optimizer Form)
DROP STATISTICS Syntax (Optimizer Form)
DROP STATISTICS Syntax Elements (Optimizer Form)
statistic
indexed_item
column_index
ANSI Compliance
DROP STATISTICS Examples (Optimizer Form)
Related Topics
HELP STATISTICS (Optimizer Form)
HELP STATISTICS Syntax (Optimizer Form)
HELP STATISTICS Syntax Elements (Optimizer Form)
Join Index or Hash Index Name
ANSI Compliance
Usage Considerations
How To Report Summary Statistics and Detailed Statistics
Examples
Example: Summary Statistics on a Database
Example: HELP STATISTICS on Multiple Individual Columns
Example: Summary Multicolumn Statistics
Example: HELP STATISTICS for a Geospatial Column
Related Topics
HELP STATISTICS (QCD Form)
HELP STATISTICS Syntax (QCD Form)
HELP STATISTICS Syntax Elements (QCD Form)
ANSI Compliance
Usage Considerations
How To Report Summary Statistics and Detailed Statistics
Example: Summary Statistics
Related Topics
Row-Level Security Constraint Statements
CREATE CONSTRAINT
CREATE CONSTRAINT Syntax
CREATE CONSTRAINT Syntax Elements
ANSI Compliance
Examples
Example: Creating a Constraint Object for a Hierarchical Classification
Example: Creating a Constraint Object with a Non-Hierarchical Classification
Related Topics
ALTER CONSTRAINT
ALTER CONSTRAINT Syntax
ALTER CONSTRAINT Syntax Elements
ANSI Compliance
ALTER CONSTRAINT Examples
Related Topics
DROP CONSTRAINT
DROP CONSTRAINT Syntax
Restrictions on Dropping a Row-Level Security Constraint
ANSI Compliance
Example: Dropping a Row-Level Security Constraint
Related Topics
Triggers Statements
ALTER TRIGGER
ALTER TRIGGER Syntax
ALTER TRIGGER Syntax Elements
ANSI Compliance
CREATE TRIGGER and REPLACE TRIGGER
CREATE TRIGGER and REPLACE TRIGGER Syntax
CREATE TRIGGER and REPLACE TRIGGER Syntax Elements
ANSI Compliance
Examples
Example: Ensuring That Parent Table Updates Propagate to its Child
Example: Audit Log for Large Pay Raises
Example: Using a SET Clause
Example: Cascaded Triggers
Example: Valid WHEN Clause
Example: Non-Valid WHEN Clause
Example: Valid Use of Subquery in WHEN Clause
Example: Non-Valid Use of Subquery in WHEN Clause
Example: OLD_NEW_TABLE AFTER UPDATE Trigger
Example: Calling an SQL Procedure From Within a Trigger
Example: Calling a UDF From a Trigger
Example: Adding to a Mailing List Using UDTs
Example: Setting a Default Address to Replace an Inserted Null
Example: Dynamic UDT Input From a Trigger
Example: Using a Trigger to Update a NoPI Table
Example: Invoking an SQL UDF Within a Trigger Definition
Related Topics
DROP TRIGGER
DROP TRIGGER Syntax
DROP TRIGGER Syntax Elements
ANSI Compliance
Example: Dropping a Trigger
Related Topics
HELP TRIGGER
HELP TRIGGER Syntax
HELP TRIGGER Syntax Elements
ANSI Compliance
HELP TRIGGER Examples
Related Topics
RENAME TRIGGER
RENAME TRIGGER Syntax
RENAME TRIGGER Syntax Elements
ANSI Compliance
Example: Rename a Trigger
Related Topics
Comment, Help, and Show Statements
COMMENT (Comment Placing Form)
COMMENT Syntax (Comment-Placing Form)
COMMENT Syntax Elements (Comment-Placing Form)
Usage Considerations
Maps and Comments
Japanese Characters in Comments
ANSI Compliance
COMMENT Examples (Comment Placing Form)
Example: Placing a Comment
Example: Commenting on a UDF
Example: Commenting on an SQL Function
Examples: Commenting on a Map
Example: Commenting on a Hash Index
Commenting on UDT and Method Definitions
Related Topics
HELP ONLINE
HELP ONLINE Syntax
HELP ONLINE Syntax Elements
ANSI Compliance
Examples: HELP ONLINE
SHOW object
SHOW object Syntax
SHOW object Syntax Elements
SHOW Options
Hash Index
Join Index
Macro
Table
Error Table For
Error Table
Trigger
View
Procedure
Specific Function
Function
Specific Method
Method
FILE
CAST and TYPE
Type
storage_format Schema
Constraint
Authorization
GLOP Set
ANSI Compliance
SHOW object Examples
Example: SHOW HASH INDEX
Example: SHOW HASH INDEX in XML Format
Example: SHOW JOIN INDEX
Example: SHOW JOIN INDEX in XML Format
Example: SHOW MACRO
Example: SHOW VIEW
Example: SHOW VIEW in XML Format
Example: SHOW PROCEDURE
Example: Showing a Java External Stored Procedure with an XML Data Type
Example: SHOW FUNCTION (External Form)
Example: SHOW FUNCTION (SQL Form)
Example: SHOW METHOD
Example: Show User-Installed File (UIF)
Example: SHOW CAST
Example: SHOW TYPE
Example: SHOW TYPE for ARRAY Types
Example: SHOW Avro SCHEMA
Example: SHOW CONSTRAINT
SHOW request
SHOW request Syntax
SHOW request Syntax Elements
Examples
Example: SHOW For a SELECT Request
Example: SHOW For a SELECT Request That Accesses Multiple Views
Example: SHOW For a SELECT Request Using the QUALIFIED Option
Example: SHOW For a SELECT Request on a Table With Multiple Referential Integrity Constraints
Example: SHOW for an Updatable DATE PPI Table
Example: SHOW for an SQL Function
Example: SHOW in XML Format
Example: SHOW for a SELECT Request with a Function Mapping
ANSI Compliance
Notation Conventions
How to Read Syntax
Character Shorthand Notation Used in This Document
Object Data Types
Data Types Syntax
Additional Information
Teradata Links
account_string
An account string assigned in the user or profile definition for the logged on user. If the account string is not valid for the user, an error occurs.
Changing the account string changes the access level for the session or request only if different workload management rules apply to the new account.
A user cannot use the SQL version of the SET SESSION ACCOUNT command to change the account for any other user.
To change accounts for another user, you can use the Performance Manager SET SESSION ACCOUNT command. See
Teradata Vantage™ - Application Programming Reference , B035-1090 .
For information about account string options and session priorities, see
Teradata Vantage™ - Database Administration , B035-1093 .
For information about creating accounts, see CREATE USER or CREATE PROFILE .
SESSION
Specifies that the account is changed for the remainder of the session.
You cannot undo this request within the current session. To revoke a session-level account change, a user must log off the session, then log back on, at which point the system assigns the user default priority.
REQUEST
Specifies that the account is changed for the next request only (next being defined as the first request this user performs after the current SET SESSION ACCOUNT request).
After that, the previous account resumes.
The specified account information is kept in volatile memory, not in DBC.SessionTbl, so a subsequent transparent system reset and recovery effectively voids this request. To be sure the request performs correctly, set SET CRASH to NOWAIT_TELL or verify the result.