Firebird Documentation Index → Firebird 2.0 Language Ref. Update
Firebird Home Firebird Home Firebird Documentation IndexNext: Introduction

Firebird 2.0 Language Reference Update

Everything new in Firebird SQL since InterBase 6

Paul Vinkenoog et al.

8 December 2010, document version 1.0 — covers Firebird 2.0–2.0.6


Table of Contents

1. Introduction
Versions covered
Authorship
2. Reserved words and keywords
Added since InterBase 6
Dropped since InterBase 6
Possibly reserved in future versions
3. Miscellaneous language elements
-- (single-line comment)
Shorthand casts
CASE construct
4. Data types and subtypes
BIGINT data type
BLOB data type
New character sets
Character set NONE handling changed
New collations
5. DDL statements
ALTER DATABASE
ALTER DOMAIN
ALTER EXTERNAL FUNCTION
ALTER PROCEDURE
ALTER SEQUENCE
ALTER TABLE
ALTER TRIGGER
COMMENT
CREATE DATABASE
CREATE DOMAIN
CREATE EXCEPTION
CREATE GENERATOR
CREATE INDEX
CREATE PROCEDURE
CREATE SEQUENCE
CREATE TABLE
CREATE TRIGGER
CREATE VIEW
CREATE OR ALTER EXCEPTION
CREATE OR ALTER PROCEDURE
CREATE OR ALTER TRIGGER
DECLARE EXTERNAL FUNCTION
DECLARE FILTER
DROP GENERATOR
DROP PROCEDURE
DROP SEQUENCE
DROP TRIGGER
RECREATE EXCEPTION
RECREATE PROCEDURE
RECREATE TABLE
RECREATE TRIGGER
RECREATE VIEW
REVOKE ADMIN OPTION
SET GENERATOR
6. DML statements
DELETE
EXECUTE BLOCK
EXECUTE PROCEDURE
INSERT
SELECT
UPDATE
7. Transaction control statements
RELEASE SAVEPOINT
ROLLBACK
SAVEPOINT
SET TRANSACTION
8. PSQL statements
BEGIN ... END blocks may be empty
BREAK
CLOSE cursor
DECLARE
EXCEPTION
EXECUTE PROCEDURE
EXECUTE STATEMENT
EXIT
FETCH cursor
FOR EXECUTE STATEMENT ... DO
FOR SELECT ... INTO ... DO
LEAVE
OPEN cursor
PLAN allowed in trigger code
UDFs callable as void functions
WHERE CURRENT OF invalid for view cursors
9. Context variables
CURRENT_CONNECTION
CURRENT_ROLE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_TRANSACTION
CURRENT_USER
DELETING
GDSCODE
INSERTING
NEW
'NOW'
OLD
ROW_COUNT
SQLCODE
UPDATING
10. Operators and predicates
NULL literals allowed as operands
|| (string concatenator)
ALL
ANY / SOME
IN
IS [NOT] DISTINCT FROM
NEXT VALUE FOR
SOME
11. Internal functions
BIT_LENGTH()
CAST()
CHAR_LENGTH(), CHARACTER_LENGTH()
COALESCE()
EXTRACT()
GEN_ID()
IIF()
LOWER()
NULLIF()
OCTET_LENGTH()
RDB$GET_CONTEXT()
RDB$SET_CONTEXT()
SUBSTRING()
TRIM()
UPPER()
12. External functions (UDFs)
addDay
addHour
addMilliSecond
addMinute
addMonth
addSecond
addWeek
addYear
ascii_char
dow
dpower
getExactTimestamp
i64round
i64truncate
log
lower
lpad
ltrim
*nullif
*nvl
rand
right
round, i64round
rpad
rtrim
sdow
srand
sright
string2blob
strlen
substr
substrlen
truncate, i64truncate
A. Notes
Character set NONE data accepted “as is
Understanding the WITH LOCK clause
A note on CSTRING parameters
Passing NULL to UDFs in Firebird 2
Maximum number of indices in different Firebird versions
B. Document History
C. License notice

List of Tables

4.1. Character sets new in Firebird
4.2. Collations new in Firebird
5.1. Maximum indexable (VAR)CHAR length
5.2. Max. indices per table, Firebird 2.0
6.1. NULLs placement in ordered columns
10.1. Comparison of [NOT] DISTINCT to “=” and “<>
11.1. Possible CASTs
11.2. Ranges for EXTRACT results
11.3. Context variables in the SYSTEM namespace
A.1. How TPB settings affect explicit locking
A.2. Max. indices per table in Firebird 1.0 – 2.0
Firebird Documentation IndexNext: Introduction
Firebird Documentation Index → Firebird 2.0 Language Ref. Update