Define Data definition language.
Answer
A Data Definition language is a computer language. It defines how can data be stored efficiently. All the commands used to create, delete databases like CREATE or DELETE are a part of data definition language.
A Data Definition language is a computer language. It defines how can data be stored efficiently. All the commands used to create, delete databases like CREATE or DELETE are a part of data definition language.
Explain the command Create Table, Alter Table and Drop Table with syntax.
Answer
Create table: Used to create a table in sql. Tables store the data. Each row in a table has a unique identifier called as a primary key.
Create table: Used to create a table in sql. Tables store the data. Each row in a table has a unique identifier called as a primary key.
Syntax:
CREATE TABLE table_name (
Column_name1 data_type,
Column_name2 data_type,
PRIMARY KEY (Column_name1));
Example:
CREATE TABLE customer (
Id Integer(10)
First_name Varchar(200)
Last name varchar(200)
PRIMARY KEY(id));
CREATE TABLE table_name (
Column_name1 data_type,
Column_name2 data_type,
PRIMARY KEY (Column_name1));
Example:
CREATE TABLE customer (
Id Integer(10)
First_name Varchar(200)
Last name varchar(200)
PRIMARY KEY(id));

0 Comments:
Post a Comment