SQL Alter Database

SQL Alter Database is used to modify the structure of existing database.

SQL Alter Database

SQL Alter Database

     

SQL Alter Database is used to modify the structure of existing database.

Understand with Example

The Tutorial illustrate an example from 'SQL Alter Database'. To grasp the example we create a database 'komal' using create database  keyword.

Create Database

Create Database komal;

Syntax

The Alter Syntax below is used to redefine the existing structure of database

ALTER {DATABASE | SCHEMA} [db_name]
    alter_specification ...alter_specification:
    [DEFAULT] CHARACTER SET [=] charset_name
  | [DEFAULT] COLLATE [=] collation_name

Query

ALTER DATABASE komal COLLATE ='binary';

Result

Ater Successful ....