Apr
01
2014 Posted by James Gill

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!

« | »
Have a Question?

Get in touch with our expert team and see how we can help with your IT project, call us on +44(0) 870 2411 550 or use our contact form…