Initializing help system before first use

SQLcolumns

SQLcolumns


Purpose
Get the columns of a given table.
Synopsis
function SQLcolumns(t:string,cname:array(range) of string,cstype:array(range) of string):integer
function SQLcolumns(t:string,cname:array(range) of string,citype:array(range) of integer):integer
function SQLcolumns(t:string,cname:array(range) of string):integer
Arguments
The table name
cname 
An array of strings to return the column names
cstype 
An array of strings to return the column types (textual representation)
citype 
An array of integers to return the column types (type codes)
Return value
Number of columns.
Example
The following example displays the names and types of columns of table 'dtt':
declarations
 CR:range
 cname:dynamic array(CR) of string
 ctype:dynamic array(CR) of string
end-declarations

nbc:=SQLcolumns("dtt",cname,ctype)
write("Table 'dtt' has columns:")
forall(c in 1..nbc) write(' ',cname(c),'(',ctype(c),')')
writeln 
Related topics
Module