GetColumnCount - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Result

 GetColumnCount
 get the number of columns in the table

 Calling Sequence result:-GetColumnCount( )

Parameters

 result - Result module

Description

 • GetColumnCount returns the number of columns in result.

Examples

Create a Result.

 > $\mathrm{driver}≔{\mathrm{Database}}_{\mathrm{LoadDriver}}\left(\right):$
 > $\mathrm{conn}≔\mathrm{driver}:-\mathrm{OpenConnection}\left(\mathrm{url},\mathrm{name},\mathrm{pass}\right):$$\mathrm{res}≔c:-\mathrm{ExecuteQuery}\left("SELECT id FROM animals"\right):$$\mathrm{res}:-\mathrm{GetColumnCount}\left(\right)$
 ${1}$ (1)
 > $\mathrm{res}≔c:-\mathrm{ExecuteQuery}\left("SELECT id,mass FROM animals"\right):$$\mathrm{res}:-\mathrm{GetColumnCount}\left(\right)$
 ${2}$ (2)
 > $\mathrm{res}≔c:-\mathrm{ExecuteQuery}\left("SELECT id,mass,name FROM animals"\right):$$\mathrm{res}:-\mathrm{GetColumnCount}\left(\right)$
 ${3}$ (3)
 > $\mathrm{res}≔c:-\mathrm{ExecuteQuery}\left("SELECT id,mass,name,number FROM animals"\right):$$\mathrm{res}:-\mathrm{GetColumnCount}\left(\right)$
 ${4}$ (4)