Tutorials

SQL Database


SQL Create Database


First thing that we need is a database which will contain all tables, views, triggers, etc. 

 

CREATE DATABASE statement is used to create database in SQL.

Syntax of Create Database

CREATE DATABASE db_name;

Example:

Suppose we want to create a database for our website Tutorials in Hand with name 'tih_database'.

So we need to write SQL command as shown below:

CREATE DATABASE tih_database;

This SQL command when executed will create a database 'tih_database'.

 

What you can do with 'tih_database'?

  • You can create different tables in this database. For example, I can create a table- 'tih_Courses' which will contain Course_name. Course_id, Proffesor_id, etc.
  • You can delete or drop the 'tih_database'.
  • You can rename 'tih_database' other suitable name like 'tih_db'
  • You can select the database on which you want to perform operation.


Please Share this page
Views : 94