I could see limit keyword is supported in latest version v10.5.500.107 5 of db2 by default without setting MYS compatibility vector. My installation was DB2 Express-C. Is there any announcement for that? I couldn't find any online document.
EDIT
After the answer of Ian I checked the value of compatibility vector after unsetting it as below also.
db2set DB2_COMPATIBILITY_VECTOR=
db2stop
db2start
and found it was MYS. seems like it is default set to MYS. that's why it has limit keyword support.
Best Answer
There was no change that I am aware of in Fixpack 5 to the requirement that the registry variable
DB2_COMPATIBILITY_VECTOR
must be set toMYS
for the... LIMIT x OFFSET y
functionality to work. (Unsetting it in FP5 still results in an error if you try to useLIMIT
/OFFSET
).You may want to look to see if
DB2_COMPATIBILITY_VECTOR
is set in the global registry.Notice that running
db2set
alone does not showDB2_COMPATIBILITY_VECTOR
:While running
db2set -all
does, since it's set at the global level: