View definition
get_view_definitionRetrieve the CREATE VIEW SQL and columns for a database view to understand how it derives data. Returns definition null and definition_visible false if the login cannot read it.
Instructions
Returns the CREATE VIEW text of one view together with its columns, in the same detail as get_table_schema. Use it to see how a view derives its data; for the objects it reads from use get_dependency_graph. A view the login can see but not read comes back with definition null and definition_visible false, which check_permissions explains.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | Yes | View name, bare, with no schema prefix. | |
| schema | No | View schema. Empty searches every schema. Example: 'Feeder' | |
| database | Yes | Name of the database as registered in the configuration. |