1. Table space for indexes
Oralce:
Create TABLE T1...
Create Index... ON T1... IN INDX_TS
DB2:
Create TABLE T1... IN DATA_TS index in INDX_TS
Create INDEX... ON T1
2. RowID
Oracle:
Oracle has RowID, which is unique in the database and can be obtained in the program.
DB2:
The corresponding value of DB2 cannot be obtained by the program.
3. Some Conversions
Oracle:
Oracle supports some conversions, such:
Create table t1 (c1 int );
Select * from t1 where c1 = '1'
Select 'abc' | 2 from t1
DB2:
DB2 does not support some conversions, such:
Create table t1 (c1 int );
Select * from t1 where c1 = CAST ('1' as int)
Select 'abc' | CHAR (2) from t1
4. Use the function value as the default value in the table.
Oracle:
Oracle supports using the function value as the default value In the table, for example:
Create table t1 (C1 Number default fn () not null,
C2 DATE DEFAULT NOT NULL SYSDATE
)
DB2:
DB2 does not support using the function value as the default value In the table, for example:
Create table t1 (C1 int not null,
C2 TIMESTAMP DEFAULT CURRENT TIMESTAMP
)
This is not allowed.
5. Some built-in functions
6. Public Synonyms)
Oracle:
Common synonyms supported by Oracle
DB2:
DB2 does not support Common synonyms.
7. Date/Time
8. External Connection
Currently, Oracle 9i also supports this ANSI join syntax.
9. Merge string and null
Select 'abc' | c1 from T1
C1 is null
Result:
Oracle: abc
DB2: null
To get 'abc', DB2 needs to do this.
Select 'abc' | coalesce (c1, '') from T1