Skip to content
View All / Mini-tip : DB2 V11, Arrays and Square Brackets

Mini-tip : DB2 V11, Arrays and Square Brackets

This has probably been around for ages and I just never noticed it, but have spotted (in a V11 manual and thought it was a typo, but it isn’t) that the square brackets can be replaced by the following:

 

  • ??(  =  [
  • ??)  =  ]

 

Possibly not of any interest until you start playing with arrays, e.g.

 

               CREATE TYPE THINGIES VARCHAR(12) ARRAY ??( 5000 ??)

 

is the same as:

 

               CREATE TYPE THINGIES VARCHAR(12) ARRAY [ 5000 ]

 

Which is rather neat if the alternative is hex editing!