Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion docs/sql-ref-syntax-ddl-alter-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,23 @@ license: |
See the License for the specific language governing permissions and
limitations under the License.
---
### Description
You can author metadata associated with a database by setting the `DBPROPERTIES`. Using this command
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "the" before DBPROPERTIES here and below?
And maybe back-tick SCHEMA and DATABASE.

you can set key-value pairs in the `DBPROPERTIES`. The specified property values override any existing
value with the same property name. Please note that the usage of SCHEMA and DATABASE are interchangable
and mean the same thing. An error message is issued if the database does not exist in the system. This
command is mostly used to record the metadata for a database and can be used for auditing purposes.

### Syntax
{% highlight sql %}
ALTER {DATABASE | SCHEMA} database_name SET DBPROPERTIES (propery_name=property_value, ...)
{% endhighlight %}

### Example
{% highlight sql %}
ALTER DATABASE inventory SET DBPROPERTIES ('Edited-by' = 'John', 'Edit-date' = '01/01/2001')
{% endhighlight %}

You can use [describe-database](sql-ref-syntax-aux-describe-database.html) command to verify the setting
of properties.

**This page is under construction**