SlideShare a Scribd company logo
2
Most read
6
Most read
Oracle DDL ,DML & DCL
ABDUL REHMAN
DDL
• SCHEMA
– A database schema is the skeleton structure that
represents the logical view of the entire database. It
defines how the data is organized and how the
relations among them are associated.
• DATA DEFINATION LANGUAGE
– Are collection of those statements which are DIRECTLY
related to database Schema
• DDL STATEMENTS ARE
– CREATE, ALTER, DROP, REPLACE AND TRUNCATE
CREATE
• Used To Create Objects Like
– CREATE TABLE
– CREATE FUNCTION
– CREATE VIEW
– Etc.
CREATE TABLE STUDENT
(
STDROLLNO number(5) primary key,
NAME varchar2(20),
CAST varchar2(20)
);
STDROLLNO NAME CAST
ALTER
• Use to Alter Objects like
– ALTER TABLE
– ALTER USER
– ALTER DATABASE
ALTER TABLE STUDENT ADD
(
ADDRESS NVARCHAR2(50)
);
STDROLLNO NAME CASTSTDROLLNO NAME CAST ADDRESS
DROP
• Use to Drop Objects like
– DROP TABLE
– DROP USER
– DROP FUNCTION
– Etc
CREATE TABLE EXTRA
(
NUM number(5) primary key,
NAME nvarchar2(20)
);
NUM NAME
DROP TABLE EXTRA;
REPLACE
• Use to Rename table names.
RENAME STUDENT TO STUDENTS;
STDROLLNO NAME CAST ADDRESS
TRUNCATE
• Use to truncate (delete all rows) a table.
DML
• Data manipulation language (DML)
• Are the statements query and manipulate
data in existing schema objects.
– INSERT
– UPDATE
– DELETE
INSERT
• Insert into STUDENTS values (3,’Atif’,’Bhatti’,’UK’);
• Insert into STUDENTS values
(13,’Ahsan’,’Khanzada’,’SK’);
STDROLLNO NAME CAST ADDRESS
3 Atif Bhatti UK
13 Ahsan Khanzada SK
UPDATE
• USED TO MODIFY DATA IN DB
– UPDATE STUDENTS SET ADDRESS=‘NAWABSHAH’
WHERE NAME=‘Atif”;
STDROLLNO NAME CAST ADDRESS
3 Atif Bhatti UK
13 Ahsan Khanzada SK
STDROLLNO NAME CAST ADDRESS
3 Atif Bhatti Nawabshah
13 Ahsan Khanzada SK
DELETE
• Use the DELETE statement to delete the rows
from existing tables which are in your schema
or if you have DELETE privilege on them.
• DELETE STUDENTS WHERE NAME=‘Ahsan’;
STDROLLNO NAME CAST ADDRESS
3 Atif Bhatti Nawabshah
13 Ahsan Khanzada SK
DCL
• Data Control Language (DCL) Statements
– Data Control Language Statements are used to
grant privileges on tables, views, procedures to
other users or roles.
– The DCL statements are
• GRANK
• REVOKE
GRANT
• Use to grant privileges to other users or roles.
• grant select, update, insert on STUDENTS to
David;
REVOKE
• Use to take back privileges granted to other
users and roles.
• revoke select, update, insert on emp from
David;

More Related Content

What's hot (20)

PPTX
Oraclesql
Priya Goyal
 
PPT
Constraints In Sql
Anurag
 
PPTX
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
PPT
Database Objects
Salman Memon
 
PPT
10. XML in DBMS
koolkampus
 
PPT
Sql server T-sql basics ppt-3
Vibrant Technologies & Computers
 
PPT
SQL Queries
Nilt1234
 
PPTX
SQL - DML and DDL Commands
Shrija Madhu
 
PPT
Introduction to-sql
BG Java EE Course
 
PDF
Data Vault 2.0: Using MD5 Hashes for Change Data Capture
Kent Graziano
 
PPT
03 namespace
Baskarkncet
 
PDF
Sql Basics | Edureka
Edureka!
 
PPT
Sql – Structured Query Language
pandey3045_bit
 
PPTX
Oracle Database View
Eryk Budi Pratama
 
PPTX
Structured query language(sql)ppt
Gowarthini
 
PPTX
DBMS Notes: DDL DML DCL
Sreedhar Chowdam
 
PPTX
Advanced SQL
Sabiha M
 
PPT
Sql Server Basics
rainynovember12
 
PDF
Microsoft SQL Server - Files and Filegroups
Naji El Kotob
 
PPTX
Null values, insert, delete and update in database
Hemant Suthar
 
Oraclesql
Priya Goyal
 
Constraints In Sql
Anurag
 
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Database Objects
Salman Memon
 
10. XML in DBMS
koolkampus
 
Sql server T-sql basics ppt-3
Vibrant Technologies & Computers
 
SQL Queries
Nilt1234
 
SQL - DML and DDL Commands
Shrija Madhu
 
Introduction to-sql
BG Java EE Course
 
Data Vault 2.0: Using MD5 Hashes for Change Data Capture
Kent Graziano
 
03 namespace
Baskarkncet
 
Sql Basics | Edureka
Edureka!
 
Sql – Structured Query Language
pandey3045_bit
 
Oracle Database View
Eryk Budi Pratama
 
Structured query language(sql)ppt
Gowarthini
 
DBMS Notes: DDL DML DCL
Sreedhar Chowdam
 
Advanced SQL
Sabiha M
 
Sql Server Basics
rainynovember12
 
Microsoft SQL Server - Files and Filegroups
Naji El Kotob
 
Null values, insert, delete and update in database
Hemant Suthar
 

Similar to Oracle Database DML DDL and TCL (20)

PPTX
Unit - II.pptx
MrsSavitaKumbhare
 
DOCX
Oracle 11g SQL Overview
Prathap Narayanappa
 
PPT
Sql basics and DDL statements
Mohd Tousif
 
PPTX
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
EliasPetros
 
PPTX
SQL _UNIT_DBMS_PRESENTSTATION_SQL _UNIT_DBMS_PRESENTSTATION
deeptanshudas100
 
PPTX
Himani uppal-221302130 WP ppt.pptx
MohitYadav889220
 
PDF
our company has an opening for a junior database administrator. As a.pdf
arshiartpalace
 
PPTX
DBMS Commands DDL DML DCL ENTITY RELATIONSHIP.pptx
Tulasi72
 
PPTX
SQL commands in database management system
Darkstorm8
 
PPTX
Relational Database Language.pptx
Sheethal Aji Mani
 
PPTX
database language ppt.pptx
Anusha sivakumar
 
PPTX
Database Languages power point presentation
AshokRachapalli1
 
PPTX
An intoduction to sql and its components
Monika Jain DAIMSR
 
PPTX
Lab
neelam_rawat
 
PPTX
What is SQL Server?
CPD INDIA
 
PPTX
Fundamentals of Database management system Lab Manual.pptx
Getnet Tigabie Askale -(GM)
 
PDF
Sql tutorial
amitabros
 
DOCX
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
SakkaravarthiS1
 
PPTX
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
Unit - II.pptx
MrsSavitaKumbhare
 
Oracle 11g SQL Overview
Prathap Narayanappa
 
Sql basics and DDL statements
Mohd Tousif
 
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
EliasPetros
 
SQL _UNIT_DBMS_PRESENTSTATION_SQL _UNIT_DBMS_PRESENTSTATION
deeptanshudas100
 
Himani uppal-221302130 WP ppt.pptx
MohitYadav889220
 
our company has an opening for a junior database administrator. As a.pdf
arshiartpalace
 
DBMS Commands DDL DML DCL ENTITY RELATIONSHIP.pptx
Tulasi72
 
SQL commands in database management system
Darkstorm8
 
Relational Database Language.pptx
Sheethal Aji Mani
 
database language ppt.pptx
Anusha sivakumar
 
Database Languages power point presentation
AshokRachapalli1
 
An intoduction to sql and its components
Monika Jain DAIMSR
 
What is SQL Server?
CPD INDIA
 
Fundamentals of Database management system Lab Manual.pptx
Getnet Tigabie Askale -(GM)
 
Sql tutorial
amitabros
 
Unit-1 SQL fundamentals.docx SQL commands used to create table, insert values...
SakkaravarthiS1
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
Ad

More from Abdul Rehman (13)

PPTX
Muhammad Bin Qasim: conquerer of Sindh and Multan
Abdul Rehman
 
PPTX
Scrum An: Agile Methodologies in Software Engineering
Abdul Rehman
 
PPTX
Segments of URL and Search Engine Optimization (SEO)
Abdul Rehman
 
PPTX
What is Bridge and Types of Bridges in Networking
Abdul Rehman
 
PPTX
Database application developer and end users
Abdul Rehman
 
PPTX
Steps of Scientific Paper
Abdul Rehman
 
PPTX
Narrative Writing and its types
Abdul Rehman
 
PPTX
Management information System and its types
Abdul Rehman
 
PPTX
Research Methods Qualitative and Quantitative
Abdul Rehman
 
PPTX
Types of Technical Report and Writing
Abdul Rehman
 
PPTX
Deletion in linked lists
Abdul Rehman
 
PPTX
Computer networking
Abdul Rehman
 
PPTX
Data communication
Abdul Rehman
 
Muhammad Bin Qasim: conquerer of Sindh and Multan
Abdul Rehman
 
Scrum An: Agile Methodologies in Software Engineering
Abdul Rehman
 
Segments of URL and Search Engine Optimization (SEO)
Abdul Rehman
 
What is Bridge and Types of Bridges in Networking
Abdul Rehman
 
Database application developer and end users
Abdul Rehman
 
Steps of Scientific Paper
Abdul Rehman
 
Narrative Writing and its types
Abdul Rehman
 
Management information System and its types
Abdul Rehman
 
Research Methods Qualitative and Quantitative
Abdul Rehman
 
Types of Technical Report and Writing
Abdul Rehman
 
Deletion in linked lists
Abdul Rehman
 
Computer networking
Abdul Rehman
 
Data communication
Abdul Rehman
 
Ad

Recently uploaded (20)

PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Digital Circuits, important subject in CS
contactparinay1
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 

Oracle Database DML DDL and TCL

  • 1. Oracle DDL ,DML & DCL ABDUL REHMAN
  • 2. DDL • SCHEMA – A database schema is the skeleton structure that represents the logical view of the entire database. It defines how the data is organized and how the relations among them are associated. • DATA DEFINATION LANGUAGE – Are collection of those statements which are DIRECTLY related to database Schema • DDL STATEMENTS ARE – CREATE, ALTER, DROP, REPLACE AND TRUNCATE
  • 3. CREATE • Used To Create Objects Like – CREATE TABLE – CREATE FUNCTION – CREATE VIEW – Etc. CREATE TABLE STUDENT ( STDROLLNO number(5) primary key, NAME varchar2(20), CAST varchar2(20) ); STDROLLNO NAME CAST
  • 4. ALTER • Use to Alter Objects like – ALTER TABLE – ALTER USER – ALTER DATABASE ALTER TABLE STUDENT ADD ( ADDRESS NVARCHAR2(50) ); STDROLLNO NAME CASTSTDROLLNO NAME CAST ADDRESS
  • 5. DROP • Use to Drop Objects like – DROP TABLE – DROP USER – DROP FUNCTION – Etc CREATE TABLE EXTRA ( NUM number(5) primary key, NAME nvarchar2(20) ); NUM NAME DROP TABLE EXTRA;
  • 6. REPLACE • Use to Rename table names. RENAME STUDENT TO STUDENTS; STDROLLNO NAME CAST ADDRESS
  • 7. TRUNCATE • Use to truncate (delete all rows) a table.
  • 8. DML • Data manipulation language (DML) • Are the statements query and manipulate data in existing schema objects. – INSERT – UPDATE – DELETE
  • 9. INSERT • Insert into STUDENTS values (3,’Atif’,’Bhatti’,’UK’); • Insert into STUDENTS values (13,’Ahsan’,’Khanzada’,’SK’); STDROLLNO NAME CAST ADDRESS 3 Atif Bhatti UK 13 Ahsan Khanzada SK
  • 10. UPDATE • USED TO MODIFY DATA IN DB – UPDATE STUDENTS SET ADDRESS=‘NAWABSHAH’ WHERE NAME=‘Atif”; STDROLLNO NAME CAST ADDRESS 3 Atif Bhatti UK 13 Ahsan Khanzada SK STDROLLNO NAME CAST ADDRESS 3 Atif Bhatti Nawabshah 13 Ahsan Khanzada SK
  • 11. DELETE • Use the DELETE statement to delete the rows from existing tables which are in your schema or if you have DELETE privilege on them. • DELETE STUDENTS WHERE NAME=‘Ahsan’; STDROLLNO NAME CAST ADDRESS 3 Atif Bhatti Nawabshah 13 Ahsan Khanzada SK
  • 12. DCL • Data Control Language (DCL) Statements – Data Control Language Statements are used to grant privileges on tables, views, procedures to other users or roles. – The DCL statements are • GRANK • REVOKE
  • 13. GRANT • Use to grant privileges to other users or roles. • grant select, update, insert on STUDENTS to David;
  • 14. REVOKE • Use to take back privileges granted to other users and roles. • revoke select, update, insert on emp from David;