| Database Toolbox | ![]() |
Get database column privileges
Syntax
lp = columnprivileges(dbmeta, 'cata', 'sch', 'tab') lp = columnprivileges(dbmeta, 'cata', 'sch', 'tab', 'l')
Description
lp = columnprivileges(dbmeta, 'cata', 'sch', 'tab')
returns the list of privileges for all columns 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.
lp = columnprivileges(dbmeta, 'cata', 'sch', 'tab', 'l')
returns the list of privileges for column l, in 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
lp = columnprivileges(dbmeta,'msdb','geck','builds','build_id')
lp =
'builds' 'build_id' {1x4 cell}
dbmeta is the database metadata objectmsdb is the catalog catageck is the schema schbuilds is the table tabbuild_id is the column name.builds, in column 1build_id, in column 2lp, in column 3To view the contents of the 3rd column in lp, type
lp{1,3}
MATLAB returns the column privileges for the build_id column.
ans =
'INSERT' 'REFERENCES' 'SELECT' 'UPDATE'
See Also
cols, columns, columnnames, dmd, get
| columnnames | columns | ![]() |