File: README.data_types

package info (click to toggle)
firebird3.0 3.0.13.ds7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 42,632 kB
  • sloc: ansic: 374,403; cpp: 319,973; sql: 14,691; pascal: 14,532; yacc: 7,557; fortran: 5,645; sh: 5,336; makefile: 1,041; perl: 194; sed: 83; awk: 76; xml: 19; csh: 15
file content (76 lines) | stat: -rw-r--r-- 2,361 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---------------------
Native SQL data types
---------------------


BIGINT (FB 1.5)
--------------

  Function:
    SQL99-compliant exact numeric type.
	
  Author:
    Dmitry Yemanov <yemanov@yandex.ru>
	
  Syntax rules:
    BIGINT
	
  Storage:
    64-bit, signed
	
  Example(s):
    1. DECLARE VARIABLE VAR1 BIGINT;
    2. CREATE TABLE TABLE1 (FIELD1 BIGINT);
	
  Note(s):
    1. Available in Dialect 3 only.
    2. Quote from the SQL-99 specification:

	SMALLINT, INTEGER, and BIGINT specify the data type exact numeric,
	with scale of 0 (zero) and binary or decimal precision. The choice
	of binary versus decimal precision is implementation-defined, but
	the same radix shall be chosen for all three data types. The precision
	of SMALLINT shall be less than or equal to the precision of INTEGER,
	and the precision of BIGINT shall be greater than or equal to the
	precision of INTEGER.


BOOLEAN (FB 3.0)
--------------

  Function:
    SQL2008-compliant boolean type.

  Author:
    Adriano dos Santos Fernandes <adrianosf at gmail.com>

  Syntax rules:
    BOOLEAN

  Storage:
    8-bit

  Example(s):
    1. DECLARE VARIABLE VAR1 BOOLEAN = TRUE;
    2. CREATE TABLE TABLE1 (FIELD1 BOOLEAN);

  Note(s):
    1. Quote from the SQL-2008 specification:

       The data type boolean comprises the distinct truth values TRUE and FALSE. Unless prohibited
       by a NOT NULL constraint, the boolean data type also supports the truth value UNKNOWN as the
       null value. This specification does not make a distinction between the null value of the
       boolean data type and the truth value Unknown that is the result of an SQL <predicate>,
       <search condition>, or <boolean value expression>; they may be used interchangeably to mean
       exactly the same thing.

    2. Represented in the API with the FB_BOOLEAN type and FB_TRUE and FB_FALSE constants.

    3. The value TRUE is greater than the value FALSE.

    4. Non-booleans values are not implicitly convertible to boolean in boolean-specific expressions
       like predicates and arguments for operators NOT, AND, OR and IS.

    5. It's allowed to test booleans without compare with TRUE or FALSE. For example,
       "field1 OR field2" and "NOT field1" are valid expressions. It's also allowed to compare with
       others operators, including the new IS operator: "field1 IS FALSE".