Cursor.columnName()

NES2+Syntax

							cursor.columnName(num)

Description

The columnName() method of the Cursor object takes the zero-based indexed number location, num, passed to the method and returns the name of the column in that location. Note that these names are not returned in any specific order unless you order them as such. Successive calls to the method, however, will return all the columns. See the example for more information on this.

Example

Listing 8.30 has two cursors. One of the cursors returns specific column names and the other returns all columns. See the comments in the code for the output.

Listing 8.30 Using the columnName() Method to Return the Names of the Columns in a Table
 <SERVER> // Create a pool of connections var ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.