Firebird 2.0
Online
Manual


FIREBIRD 2.0 PSQL REFERENCE MANUAL


Chapter 1: PSQL STORED PROCEDURES

Overview of PSQL stored procedures
Create procedure
Procedures – input parameters
Procedures – output parameters
Alter procedure
Drop procedure

Chapter 2: PSQL TRIGGERS

Overview of PSQL triggers
Create trigger
Trigger – action clause
Trigger – position clause
Alter trigger
Drop trigger

Chapter 3: PSQL EXCEPTIONS

Overview of PSQL exceptions
Create exception
Alter exception
Drop exception

Chapter 4: PSQL PROGRAMS

Overview of PSQL programs
PSQL programs
Identifiers in PSQL
Variable declarations
Variable declarations – scalar
Variable declarations – cursor
Exception handlers
Exception handlers – when gdscode
Exception handlers – when sqlcode
Exception handlers – when exception

Chapter 5: PSQL DATATYPES

Overview of PSQL datatypes
Integer datatypes
Scaled datatypes
Float datatypes
(n)char datatypes
(n)varchar datatypes
Date/time datatypes

Chapter 6: PSQL EXPRESSIONS

Overview of PSQL expressions
Using variables in PSQL
Using arrays in PSQL
Literals
Numerical literals
Text literals
Date, time and timestamp literals
Binary operators
Additive operators
Multiplicative operators
Concatenation operator
Collation order operator
Built-in functions
Standard library functions
Context variable functions
Extract function
Length functions
Upper expression
Lower function
Substring function
Trim function
Case expression
Nullif expression
Iif expression
Coalesce expression
Cast expression
Sequence expressions
System information functions
Current_user, user function
Current_role function
Current_connection function
Current_transaction function
Current_date function
Current_time function
Current_timestamp function
Gdscode function
Sqlcode function
Row_count function

Chapter 7: PSQL CONDITIONS

Overview of PSQL conditions
And condition
Or condition
Scalar comparison condition
Group comparison condition
Is null condition
Is distinct from condition
Between condition
In condition
Like condition
Containing condition
Starting with condition
Exists condition
Singular condition

Chapter 8: PSQL STATEMENTS

Overview of PSQL statements
Assignment statement
Compound statement
Delete statement
Exception statement
Execute procedure statement
Execute sql statement
Exit statement
Fetch cursor statement
For execute into statement
For select do statement
If then else statement
Insert statement
Leave (break) statement
Open cursor statement
Post_event statement
Select into statement
Suspend statement
Update statement
While do statement



Legal information