SQLColumnPrivileges[conn]
returns a table of access rights for the columns in an SQL connection.
SQLColumnPrivileges[conn,table]
returns a table pertaining to the columns in table.
SQLColumnPrivileges[conn,SQLTable[table]]
returns a table pertaining to the columns in table.
SQLColumnPrivileges[conn,{table,column}]
returns a table pertaining to the columns in table matching column.
SQLColumnPrivileges[conn,SQLColumn[{table,column}]]
returns a table pertaining to the columns in table matching column.
SQLColumnPrivileges[conn,SQLColumn[column]]
returns a table pertaining to the columns in any table matching column.
SQLColumnPrivileges
SQLColumnPrivileges[conn]
returns a table of access rights for the columns in an SQL connection.
SQLColumnPrivileges[conn,table]
returns a table pertaining to the columns in table.
SQLColumnPrivileges[conn,SQLTable[table]]
returns a table pertaining to the columns in table.
SQLColumnPrivileges[conn,{table,column}]
returns a table pertaining to the columns in table matching column.
SQLColumnPrivileges[conn,SQLColumn[{table,column}]]
returns a table pertaining to the columns in table matching column.
SQLColumnPrivileges[conn,SQLColumn[column]]
returns a table pertaining to the columns in any table matching column.
Details and Options
- To use SQLColumnPrivileges, you first need to load DatabaseLink using Needs["DatabaseLink`"].
- Table and column specifications may include SQL wildcards.
- The following options can be given:
-
"Catalog" None database catalog to use "Schema" None database schema to use "ShowColumnHeadings" False whether to return headings with the results
Examples
Basic Examples (1)
Needs["DatabaseLink`"]If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the "DatabaseLink`DatabaseExamples`" package, as described in Using the Example Databases.
conn = OpenSQLConnection["demo"];Get {table,column} pairs for a particular table:
SQLColumnPrivileges[conn, "SAMPLETABLE1", "ShowColumnHeadings" -> True]Restrict results to a particular column:
SQLColumnPrivileges[conn, {"SAMPLETABLE1", "ENTRY"}, "ShowColumnHeadings" -> True]CloseSQLConnection[conn];