SQLTablePrivileges[conn]
returns a table of access rights about the tables in an SQL connection.
SQLTablePrivileges[conn,table]
returns access rights for table.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
DatabaseLink`
DatabaseLink`
SQLTablePrivileges
SQLTablePrivileges[conn]
returns a table of access rights about the tables in an SQL connection.
SQLTablePrivileges[conn,table]
returns access rights for table.
Details and Options
- To use SQLTablePrivileges, you first need to load DatabaseLink using Needs["DatabaseLink`"].
- 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["publisher"];Fetch privileges for all tables available on this connection:
SQLTablePrivileges[conn, "ShowColumnHeadings" -> True]//Take[#, UpTo[20]]&//TableFormFetch privileges for a single table:
SQLTablePrivileges[conn, "AUTHORS", "ShowColumnHeadings" -> True]//TableFormCloseSQLConnection[conn];