]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - maintenance/ibm_db2/README
MediaWiki 1.15.0-scripts
[autoinstalls/mediawiki.git] / maintenance / ibm_db2 / README
1 == Syntax differences between other databases and IBM DB2 ==
2 {| border cellspacing=0 cellpadding=4
3 !MySQL!!IBM DB2
4 |-
5
6 |SELECT 1 FROM $table LIMIT 1
7 |SELECT COUNT(*) FROM SYSIBM.SYSTABLES ST
8 WHERE ST.NAME = '$table' AND ST.CREATOR = '$schema'
9 |-
10 |MySQL code tries to read one row and interprets lack of error as proof of existence.
11 |DB2 code counts the number of TABLES of that name in the database. There ought to be 1 for it to exist.
12 |-
13 |BEGIN
14 |(implicit)
15 |-
16 |TEXT
17 |VARCHAR(255) or CLOB
18 |-
19 |TIMESTAMPTZ
20 |TIMESTAMP
21 |-
22 |BYTEA
23 |VARGRAPHIC(255)
24 |-
25 |DEFAULT nextval('some_kind_of_sequence'),
26 |GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1),
27 |-
28 |CIDR
29 |VARCHAR(255)
30 |-
31 |LIMIT 10
32 |FETCH FIRST 10 ROWS ONLY
33 |-
34 |ROLLBACK TO
35 |ROLLBACK TO SAVEPOINT
36 |-
37 |RELEASE
38 |RELEASE SAVEPOINT
39 |}
40 == See also ==
41 *[http://ca.php.net/manual/en/function.db2-connect.php PHP Manual for DB2 functions]