Sql CREATE Database

SQL CREATE DATABASE:- The SQL CREATE DATABASE Statement is used by a developer to create a Database.

SYNTAX:-

CREATE DATABASE databasename;

Example:-
The following SQL statement creates a database called "test":-

CREATE DATABASE test;

SQL DROP DATABASE:- The SQL DROP DATABASE  Statement is used to DROP an existing SQL database . Dropping a Database will result in the loss of complete information stored in the database.

SYNTAX:-

DROP DATABASE databasename;

Example:- 
The following statement will delete the database named "test":-

DROP DATABASE test ;

SQL RENAME DATABASE:- SQL RENAME DATABASE Statement is used to change the name of your old database to a new database.

SYNTAX:-

RENAME DATABASE old_db_name to new_db_name;

SQL SELECT DATABASE:- In MySql, you need to first select the database before executing any query on the table.

SYNTAX:-

USE DATABASE database_name ;

Comments

Popular posts from this blog

ASP.NET Overview

SQL AND ,OR, NOT Operators

SQL Joins