\usemodule[database]

\startsetups Table:EXT
 \setupTABLE[style={\switchtobodyfont[9pt]}]
\stopsetups


\defineseparatedlist
 [MyTableExt]
 [separator=tab,
  left=\bTD,right=\eTD,
  first=\bTR,last=\eTR,
  setups=Table:EXT,
  before=\bTABLE,after=\eTABLE]

  \setvariables[desc][
    fieldHeadingA={\bf Field name},
    fieldHeadingB={\bf Field type},
    fieldHeadingC={\bf Field modifiers},
    fieldHeadingD={\bf Field constraints},
    fieldHeadingE={\bf Comments/Usage}]

\starttext

\setupTABLE[row][1][nx=5]
\setupTABLE[row][2][nx=5]
\setupTABLE[row][last][nx=5]
\startMyTableExt
[nx=5]Table name
[nx=5]Table summary
{\getvariable{desc}{fieldHeadingA}}	{\getvariable{desc}{fieldHeadingB}}	{\getvariable{desc}{fieldHeadingC}}	 {\getvariable{desc}{fieldHeadingD}}	{\getvariable{desc}{fieldHeadingE}}
id	CHAR(16)	NOT NULL	PK	
[nx=5]Table constraints
\stopMyTableExt

\bTABLE
\bTR \bTD[nx=5] Table name \eTD \eTR
\bTR \bTD[nx=5] Table summary \eTD \eTR
\bTR
	\bTD {\getvariable{desc}{fieldHeadingA}} \eTD
	\bTD {\getvariable{desc}{fieldHeadingB}} \eTD
	\bTD {\getvariable{desc}{fieldHeadingC}} \eTD
	\bTD {\getvariable{desc}{fieldHeadingD}} \eTD
	\bTD {\getvariable{desc}{fieldHeadingE}} \eTD
\eTR
\bTR
 \bTD id	 \eTD
 \bTD CHAR(16) \eTD
 \bTD NOT NULL \eTD
 \bTD PK \eTD
 \bTD \eTD
\eTR
\bTR \bTD[nx=5] Table constraints\eTD \eTR
\eTABLE

\starttable[|l|l|l|l|l|]
\HL
\VL \use{5} Table name \VL \SR
\HL
\VL \use{5} Table summary \VL \SR
\HL
\VL \bf Field name \VL \bf Field type \VL \bf Field modifiers \VL \bf Field constraints \VL \bf Comments/Usage \VL \SR
\HL
\VL \use{5} Table constraints \VL \SR
\HL
\stoptable

\stoptext
