Sunday, April 3, 2022

MySql- Working With Database

 

Working with databases

Create a database with a specified name if it does not exist in the database server

CREATE DATABASE [IF NOT EXISTS] database_name;
Code language: SQL (Structured Query Language) (sql)

Use a database or change the current database to another database that you are working with:

USE database_name;
Code language: SQL (Structured Query Language) (sql)

Drop a database with a specified name permanently. All physical files associated with the database will be deleted.

DROP DATABASE [IF EXISTS] database_name;
Code language: SQL (Structured Query Language) (sql)

Show all available databases in the current MySQL database server

SHOW DATABASE;

0 comments:

Post a Comment