Database Toolbox |
Get database table column names
Syntax
l = columns(dbmeta, 'cata') l = columns(dbmeta, 'cata', 'sch') l = columns(dbmeta, 'cata', 'sch', 'tab')
Description
l = columns(dbmeta, 'cata')
returns the list of all column names in the catalog cata
, for the database whose database metadata object is dbmeta
, where dbmeta
was created using dmd
.
l = columns(dbmeta, 'cata', 'sch')
returns the list of all column names in the schema sch
, of the catalog cata
, for the database whose database metadata object is dbmeta
, where dbmeta
was created using dmd
.
l = columns(dbmeta, 'cata', 'sch', 'tab')
returns the list of columns for the table tab
, in the schema sch
, of the catalog cata
, for the database whose database metadata object is dbmeta
, where dbmeta
was created using dmd
.
Examples
The results show the names of the five tables and a cell array containing the column names in the tables.
To see the column names for the BONUS
table, type
which are the column names in the BONUS
table.
See Also
attr
, bestrowid
, cols
, columnnames
, columnprivileges
, dmd
, get
, versioncolumns
columnprivileges | commit |
© 1994-2005 The MathWorks, Inc.