COMMENT ON VIEW
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
commentOnView("view").is("the comment")
Translates to the following dialect specific expressions:
-- AURORA_POSTGRES, FIREBIRD, HANA, POSTGRES, TERADATA, TRINO, VERTICA, YUGABYTEDB COMMENT ON VIEW view IS 'the comment' -- BIGQUERY ALTER VIEW view SET OPTIONS (DESCRIPTION = 'the comment') -- DB2, H2, HSQLDB, ORACLE COMMENT ON TABLE view IS 'the comment' -- SNOWFLAKE ALTER VIEW view SET COMMENT = 'the comment' -- SQLSERVER BEGIN TRY DECLARE @u varchar(max) = schema_name(); EXEC sp_addextendedproperty 'MS_Description', 'the comment', 'schema', @u, 'view', 'view', DEFAULT, DEFAULT END TRY BEGIN CATCH EXEC sp_updateextendedproperty 'MS_Description', 'the comment', 'schema', @u, 'view', 'view', DEFAULT, DEFAULT END CATCH -- ACCESS, ASE, AURORA_MYSQL, COCKROACHDB, DERBY, DUCKDB, EXASOL, INFORMIX, MARIADB, MEMSQL, MYSQL, REDSHIFT, -- SQLDATAWAREHOUSE, SQLITE, SYBASE /* UNSUPPORTED */
(These are currently generated with jOOQ 3.19, see #10141), or translate your own on our website
Feedback
Do you have any feedback about this page? We'd love to hear it!