Creating, Altering & Deleting Database in SSMS

--

What is DDL?

A data definition language (DDL) is a computer language used to create and modify the structure of database objects in a database. These database objects include views, schemas, tables, indexes, etc.

Creating a Database

Syntax

CREATE DATABASE Mhasan;
CREATE TABLE Persons
(
PersonID int,
LastName varchar(50),
FirstName varchar(50),
Address varchar(255),
City varchar(20)
);

Altering a Database.

Syntax

ALTER DATABASE test MODIFY NAME = test2

Deleting a Database.

Syntax

DROP DATABASE test;

--

--

No responses yet