Triton Db2 Geek

Confessions of a DB2 geek

IBM Gold Consultant Program and IBM Premier business Partner

Mini-tip : DB2 V11, Arrays and Square Brackets

April 1st, 2014 - by

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!

Comments

« »

Tag Archives