SlideShare a Scribd company logo
By : Dhirendra Chauhan
Table
“The Table is combination of Rows and Columns
which intersect each other and make cell where we
store value.
Row/Tuple/Cardinality
Columns/Relation/field/Degree
Cell
CREATE TABLE
The CREATE TABLE statement allows you to create a
new table in a database.
Syntax Example
CREATE TABLE table_name
( column_1 Data_Type ,
column_1 Data_Type ,
:,
:,
column_1 Data_Type ) ;
CREATE TABLE student
(
ROLL_NO INT(3) ,
STUDENT_NAME
VARCHAR(50),
T_MARKS INT(3),
RESULT VARCHAR(10)
);
CREATE TABLE
CODING
DESC
DESC command describe statements above show the columns in the table and all
their attributes such as name, data type, collation, Nullability, Primary key, default,
comment, etc. We often use EXPLAIN
Syntax:
DESC TABLE_NAME;
Example
DESC STUDENT;
THANK
YOU

More Related Content

What's hot

SQL-Alter Table, SELECT DISTINCT & WHERE
SQL-Alter Table, SELECT DISTINCT & WHERESQL-Alter Table, SELECT DISTINCT & WHERE
SQL-Alter Table, SELECT DISTINCT & WHERE
I L0V3 CODING DR
 
Mysql Statments
Mysql StatmentsMysql Statments
Mysql Statments
SHC
 
SQL
SQLSQL
Higher SQL
Higher SQLHigher SQL
Higher SQL
missstevenson01
 
Sql commands
Sql commandsSql commands
Sql commands
Pooja Dixit
 
intro for sql
intro for sql intro for sql
intro for sql
mahmoud mones
 
DATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQLDATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQL
Dev Chauhan
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Plsql arrays
Plsql arraysPlsql arrays
Plsql arrays
Satish Singh
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
Ishucs
 
Exploring collections with example
Exploring collections with exampleExploring collections with example
Exploring collections with example
pranav kumar verma
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
Hammad Rasheed
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Ehsan Hamzei
 
Creating, altering and dropping tables
Creating, altering and dropping tablesCreating, altering and dropping tables
Creating, altering and dropping tables
punu_82
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
Sachidananda M H
 
SQL
SQLSQL
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraints
Vivek Singh
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
amitabros
 
MS SQL Database basic
MS SQL Database basicMS SQL Database basic
MS SQL Database basic
wali1195189
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 

What's hot (20)

SQL-Alter Table, SELECT DISTINCT & WHERE
SQL-Alter Table, SELECT DISTINCT & WHERESQL-Alter Table, SELECT DISTINCT & WHERE
SQL-Alter Table, SELECT DISTINCT & WHERE
 
Mysql Statments
Mysql StatmentsMysql Statments
Mysql Statments
 
SQL
SQLSQL
SQL
 
Higher SQL
Higher SQLHigher SQL
Higher SQL
 
Sql commands
Sql commandsSql commands
Sql commands
 
intro for sql
intro for sql intro for sql
intro for sql
 
DATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQLDATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQL
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
Plsql arrays
Plsql arraysPlsql arrays
Plsql arrays
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
Exploring collections with example
Exploring collections with exampleExploring collections with example
Exploring collections with example
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Creating, altering and dropping tables
Creating, altering and dropping tablesCreating, altering and dropping tables
Creating, altering and dropping tables
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
SQL
SQLSQL
SQL
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraints
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
MS SQL Database basic
MS SQL Database basicMS SQL Database basic
MS SQL Database basic
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 

More from Dhirendra Chauhan

V35 keys-c
V35  keys-cV35  keys-c
V35 keys-c
Dhirendra Chauhan
 
V34 numeric function-c
V34  numeric function-cV34  numeric function-c
V34 numeric function-c
Dhirendra Chauhan
 
V33 date function-c
V33  date function-cV33  date function-c
V33 date function-c
Dhirendra Chauhan
 
V31 having
V31  havingV31  having
V31 having
Dhirendra Chauhan
 
V30 full join(union intersect etc)
V30  full join(union intersect etc)V30  full join(union intersect etc)
V30 full join(union intersect etc)
Dhirendra Chauhan
 
V29 group by-c
V29  group by-cV29  group by-c
V29 group by-c
Dhirendra Chauhan
 
V28 view
V28  viewV28  view
V27 constraint
V27 constraintV27 constraint
V27 constraint
Dhirendra Chauhan
 
V26 key
V26 keyV26 key
V25 sql index
V25 sql indexV25 sql index
V25 sql index
Dhirendra Chauhan
 
V24 cartesion product-c
V24 cartesion product-cV24 cartesion product-c
V24 cartesion product-c
Dhirendra Chauhan
 
V23 function-2
V23 function-2V23 function-2
V23 function-2
Dhirendra Chauhan
 
V22 function-1
V22 function-1V22 function-1
V22 function-1
Dhirendra Chauhan
 
V21 in operator
V21 in operatorV21 in operator
V21 in operator
Dhirendra Chauhan
 
V20 bet ween operator-c
V20 bet ween operator-cV20 bet ween operator-c
V20 bet ween operator-c
Dhirendra Chauhan
 
V19 join method-c
V19 join method-cV19 join method-c
V19 join method-c
Dhirendra Chauhan
 
V18 alias-c
V18 alias-cV18 alias-c
V18 alias-c
Dhirendra Chauhan
 
V17 show command-c
V17 show command-cV17 show command-c
V17 show command-c
Dhirendra Chauhan
 
V16 sql comments-c
V16 sql comments-cV16 sql comments-c
V16 sql comments-c
Dhirendra Chauhan
 
V15 like operator-c
V15 like operator-cV15 like operator-c
V15 like operator-c
Dhirendra Chauhan
 

More from Dhirendra Chauhan (20)

V35 keys-c
V35  keys-cV35  keys-c
V35 keys-c
 
V34 numeric function-c
V34  numeric function-cV34  numeric function-c
V34 numeric function-c
 
V33 date function-c
V33  date function-cV33  date function-c
V33 date function-c
 
V31 having
V31  havingV31  having
V31 having
 
V30 full join(union intersect etc)
V30  full join(union intersect etc)V30  full join(union intersect etc)
V30 full join(union intersect etc)
 
V29 group by-c
V29  group by-cV29  group by-c
V29 group by-c
 
V28 view
V28  viewV28  view
V28 view
 
V27 constraint
V27 constraintV27 constraint
V27 constraint
 
V26 key
V26 keyV26 key
V26 key
 
V25 sql index
V25 sql indexV25 sql index
V25 sql index
 
V24 cartesion product-c
V24 cartesion product-cV24 cartesion product-c
V24 cartesion product-c
 
V23 function-2
V23 function-2V23 function-2
V23 function-2
 
V22 function-1
V22 function-1V22 function-1
V22 function-1
 
V21 in operator
V21 in operatorV21 in operator
V21 in operator
 
V20 bet ween operator-c
V20 bet ween operator-cV20 bet ween operator-c
V20 bet ween operator-c
 
V19 join method-c
V19 join method-cV19 join method-c
V19 join method-c
 
V18 alias-c
V18 alias-cV18 alias-c
V18 alias-c
 
V17 show command-c
V17 show command-cV17 show command-c
V17 show command-c
 
V16 sql comments-c
V16 sql comments-cV16 sql comments-c
V16 sql comments-c
 
V15 like operator-c
V15 like operator-cV15 like operator-c
V15 like operator-c
 

Recently uploaded

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 

Recently uploaded (20)

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 

Create table

  • 1. By : Dhirendra Chauhan
  • 2. Table “The Table is combination of Rows and Columns which intersect each other and make cell where we store value. Row/Tuple/Cardinality Columns/Relation/field/Degree Cell
  • 3. CREATE TABLE The CREATE TABLE statement allows you to create a new table in a database. Syntax Example CREATE TABLE table_name ( column_1 Data_Type , column_1 Data_Type , :, :, column_1 Data_Type ) ; CREATE TABLE student ( ROLL_NO INT(3) , STUDENT_NAME VARCHAR(50), T_MARKS INT(3), RESULT VARCHAR(10) );
  • 5. DESC DESC command describe statements above show the columns in the table and all their attributes such as name, data type, collation, Nullability, Primary key, default, comment, etc. We often use EXPLAIN Syntax: DESC TABLE_NAME; Example DESC STUDENT;