0% found this document useful (0 votes)
4 views2 pages

SQL Database Alter Options Explained

The document outlines options for altering a database, including changing the character set, collation, enabling or disabling encryption, and setting the database to read-only mode. Each option is described with examples, such as character sets like ascii and utf8, and collations like utf8_general_ci. It also notes that collation determines how data is sorted and compared in a database.

Uploaded by

f20230989
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

SQL Database Alter Options Explained

The document outlines options for altering a database, including changing the character set, collation, enabling or disabling encryption, and setting the database to read-only mode. Each option is described with examples, such as character sets like ascii and utf8, and collations like utf8_general_ci. It also notes that collation determines how data is sorted and compared in a database.

Uploaded by

f20230989
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

CHARACTER SET
2. COLLATE
Function 3.
4.
ENCRYPTION
READ ONLY

ALTER DATABASE databasename alter_option option_value….;

Name of the
Database
OPTIONS DESCRIPTIONS

CHARACTER SET This option allows you to change the default character set of the
database. Example – ascii, utf8, etc.
COLLATE This option allows you to change the collation of the database.
Example – utf8_general_ci
ENCRYPTION This option allows you enable (Y) or disable (N) the default database
encryption.

READ ONLY Using this option you can allow modifications on the database along
with the objects within (0) or make it read only (1).

N.B.: In SQL, collation refers to the set of rules that determine how data is sorted and compared in a
database. It specifies the character set encoding for a particular column or table in a database, as well
as the rules for comparing and sorting characters in that column or table.

You might also like