| Database Toolbox | ![]() |
Get database table unique row identifier
Syntax
b = bestrowid(dbmeta, 'cata', 'sch') b = bestrowid(dbmeta, 'cata', 'sch', 'tab')
Description
b = bestrowid(dbmeta, 'cata', 'sch')
determines and returns the optimal set of columns in a table that uniquely identifies a row, in the schema sch, of the catalog cata, for the database whose database metadata object is dbmeta, where dbmeta was created using dmd.
b = bestrowid(dbmeta, 'cata', 'sch', 'tab')
determines and returns the optimal set of columns that uniquely identifies a row in 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
b = bestrowid(dbmeta,'msdb','geck','builds')
b =
'build_id'
dbmeta is the database metadata objectmsdb is the catalog catageck is the schema sch, isbuilds is the table tabThe results is build_id, which means that every entry in the build_id column is unique and can be used to identify the row.
See Also
columns, dmd, get, tables
| attr | clearwarnings | ![]() |