How can you change comments in Oracle database?

To update the comments in an Oracle database, you can use the following SQL statement:

COMMENT ON TABLE table_name IS 'new_table_comment';
COMMENT ON COLUMN table_name.column_name IS 'new_column_comment';

In this case, table_name refers to the name of the table whose comments are to be modified, column_name refers to the name of the column where comments are to be modified, new_table_comment denotes the new comment for the table, and new_column_comment refers to the new comment for the column.

To change the comments of the table employees to “This table stores employee information,” you can use the following SQL statement:

COMMENT ON TABLE employees IS 'This table stores employee information';

You can use the following SQL statement to change the comment for the column “first_name” in the employees table to “First name of the employee”:

COMMENT ON COLUMN employees.first_name IS 'First name of the employee';

More tutorials

How to utilize comments in Ruby programming language(Opens in a new browser tab)

The Java language implements the Prototype Design Pattern.(Opens in a new browser tab)

How can an Oracle table’s primary key be deleted?(Opens in a new browser tab)

What is the purpose of resize in C++?(Opens in a new browser tab)

How can I view the primary key of a table in Oracle?(Opens in a new browser tab)


Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds