DB2 – Limit Keyword Support in Latest Version

db2

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 to MYS for the ... LIMIT x OFFSET y functionality to work. (Unsetting it in FP5 still results in an error if you try to use LIMIT / 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 show DB2_COMPATIBILITY_VECTOR:

$ db2set
DB2COMM=TCPIP
DB2AUTOSTART=YES

While running db2set -all does, since it's set at the global level:

$ db2set -all
[i] DB2COMM=TCPIP
[i] DB2AUTOSTART=YES
[g] DB2_COMPATIBILITY_VECTOR=MYS
[g] DB2SYSTEM=host1
[g] DB2INSTDEF=db2inst1