Using InterSystems SQL Using InterSystems SQL Get Started Topics InterSystems SQL Features Architecture Features Interoperability Limitations InterSystems SQL Basics Tables Queries Privileges Data Display Options Data Collation Executing SQL Language Elements Commands and Keywords Functions: Intrinsic and Extrinsic Literals NULL and the Empty String Arithmetic Operators and Functions Relational Operators Logical Operators Comments Implicit Joins (Arrow Syntax) Property Reference Child Table Reference Arrow Syntax Privileges Identifiers Simple Identifiers Delimited Identifiers SQL Reserved Words Using Embedded SQL Compiling Embedded SQL Embedded SQL Syntax Embedded SQL Code Host Variables SQL Cursors Embedded SQL Variables Embedded SQL in Methods of a Persistent Class Validating Embedded SQL Code Auditing Embedded SQL Using Dynamic SQL Introduction to Dynamic SQL The %SQL.Statement Class Creating an Object Instance Preparing an SQL Statement Executing an SQL Statement Returning the Full Result Set Returning Specific Values from the Result Set Returning Multiple Result Sets SQL Metadata Auditing Dynamic SQL Using the SQL Shell Interface Other Ways of Executing SQL Invoking the SQL Shell Storing and Recalling SQL Statements Purging Cached Queries Configuring the SQL Shell SQL Metadata, Query Plan, and Performance Metrics Transact-SQL Support &validchapter; Management Portal SQL Facilities Executing SQL Query Filtering Schema Contents Catalog Details Defining Tables Table Names and Schema Names Schema Name Table Name RowID Field Primary Key RowVersion, AutoIncrement, and Serial Counter Fields Defining a Table by Using DDL Defining a Table by Creating a Persistent Class Defining a Sharded Table Defining a Table by Querying an Existing Table Foreign Tables Listing Tables Listing Column Names and Numbers Listing Constraints Defining and Using Views Creating a View Altering a View Updateable Views Read-only Views View ID: %VID Listing View Properties Listing View Dependencies Relationships Between Tables Defining a Foreign Key Foreign Key Referential Integrity Checking Parent and Child Tables Using Triggers Defining Triggers Types of Triggers ObjectScript Trigger Code Python Trigger Code Pulling Triggers Triggers and Object Access Triggers and Transactions Listing Triggers Collation Collation Types Namespace-wide Default Collation Table Field/Property Definition Collation Index Definition Collation Query Collation Legacy Collation Types SQL and NLS Collations Modifying the Database Inserting Data UPDATE Statements Computed Field Values on INSERT or UPDATE Validating Data DELETE Statements Transaction Processing Querying the Database Types of Queries Using a SELECT Statement Defining and Executing Named Queries Queries Invoking User-defined Functions Querying Serial Object Properties Querying Collections Queries Invoking Free-text Search Pseudo-Field Variables Query Metadata Queries and Enterprise Cache Protocol (ECP) Cached Queries Defining and Using Stored Procedures Overview Defining Stored Procedures Using Stored Procedures Listing Procedures Storing and Using Stream Data (BLOBs and CLOBs) Stream Fields and SQL Stream Field Concurrency Locking Using Stream Fields within InterSystems IRIS Methods Using Stream Fields from ODBC Using Stream Fields from JDBC SQL Users, Roles, and Privileges SQL Privileges and System Privileges %Admin_Secure Permission %Admin_RoleEdit Permission %Admin_UserEdit Permission Users Roles SQL Privileges SQL Settings Reference How to Change Each SQL Setting Settings that Require Permissions Importing SQL Code Importing InterSystems SQL Code Migration: Importing non-InterSystems SQL Importing and Exporting SQL Data Importing Data with LOAD DATA Exporting Data to a Text File