SlideShare a Scribd company logo
1 of 10
INTRODUCTION TO SQL
Prepared by
Ravichandiran
Senior Oracle Trainer
WHY MAZENET?
• Oracle Certified Partner & more than 10+ years experienced
Trainers.
• Oracle unique id for students
• E-kits from Oracle University
• Course Completion Certificate from Oracle University.
• Flexible timing for working professionals.
• Preparing candidates to face interview and free resume
preparation.
COMMANDS
DDL - DATA DEFINITION LANUGAGE
DML - DATA MANIPULATION LANGUAGE
TCL - TRANSACTION CONTROL LANGUAGE
DCL - DATA CONTROL LANGUAGE
DRL - DATA RETRIEVAL LANGUAGE
DDL
• Used to create or modify the structure of the table.
• Auto commit occurs. Changes cannot be rolled
back.
• Session independent commands.
• Commands are :
CREATE, ALTER DROP, TRUNCATE, RENAME
DDL - CREATE
SYNTAX
create table <tab_name>
(
col1 datatype(size),
col2 datatype(size),
...........
.............
coln datatype(size)
);
SYNTAX
create table <tab_name>
(
col1 datatype(size),
col2 datatype(size),
...........
.............
coln datatype(size)
);
EXAMPLE
Create table emp
(
empno number(5),
ename varchar2(20),
job varchar2(20)
);
EXAMPLE
Create table emp
(
empno number(5),
ename varchar2(20),
job varchar2(20)
);
DDL - ALTER
ADD
• ALTER TABLE EMP ADD
DOJ DATE;
• ALTER TABLE EMP ADD
( SALARY NUMBER(5),
COMM NUMBER(4),
DEPTNO NUMBER(3));
ADD
• ALTER TABLE EMP ADD
DOJ DATE;
• ALTER TABLE EMP ADD
( SALARY NUMBER(5),
COMM NUMBER(4),
DEPTNO NUMBER(3));
MODIFY
• ALTER TABLE EMP ADD
DOJ DATE;
• ALTER TABLE EMP ADD
( SALARY NUMBER(5),
COMM NUMBER(4),
DEPTNO NUMBER(3));
MODIFY
• ALTER TABLE EMP ADD
DOJ DATE;
• ALTER TABLE EMP ADD
( SALARY NUMBER(5),
COMM NUMBER(4),
DEPTNO NUMBER(3));
DDL - ALTER
DROP COLUMN
• ALTER TABLE EMP DROP
COLUMN DEPTNO;
• ALTER TABLE EMP
DROP(DOJ,COMM);
DROP COLUMN
• ALTER TABLE EMP DROP
COLUMN DEPTNO;
• ALTER TABLE EMP
DROP(DOJ,COMM);
RENAME COLUMN
• ALTER TABLE EMP
RENAME COLUMN EMPNO
TO ENO;
RENAME COLUMN
• ALTER TABLE EMP
RENAME COLUMN EMPNO
TO ENO;
DDL - DROP
TABLE DROPPED
• DROP TABLE EMP;
• DROP TABLE EMP
PURGE;
• PURGE RECYCLEBIN;
• PURGE TABLE EMP;
TABLE DROPPED
• DROP TABLE EMP;
• DROP TABLE EMP
PURGE;
• PURGE RECYCLEBIN;
• PURGE TABLE EMP;
FLASHBACK COMMAND
• Flashback table emp to
before drop;
• Flashback table emp to
before drop rename to
employees;
FLASHBACK COMMAND
• Flashback table emp to
before drop;
• Flashback table emp to
before drop rename to
employees;
DDL - TRUNCATE
• Used to remove records from table.
• Cannot delete single row alone
• Changes are permanent. So deleted record cannot
be rolled back.
TRUNCATE TABLE EMP;
DDL - RENAME
• Used to rename the table.
RENAME <OLD_TABLE_NAME> TO
<NEW_TAB_NAME>;
RENAME EMP TO EMPLOYEES;

More Related Content

Viewers also liked

Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionMazenetsolution
 
Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.
Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.
Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.Vuz Dở Hơi
 
Static testing techniques
Static testing techniquesStatic testing techniques
Static testing techniquesMazenetsolution
 
Java - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionJava - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionMazenetsolution
 
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionSoftware Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionMazenetsolution
 
Java- Updates in java8-Mazenet solution
Java- Updates in java8-Mazenet solutionJava- Updates in java8-Mazenet solution
Java- Updates in java8-Mazenet solutionMazenetsolution
 
Java- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solutionJava- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solutionMazenetsolution
 
Cehv8 Labs - Module15: Hacking Wireless Networks.
Cehv8 Labs - Module15: Hacking Wireless Networks.Cehv8 Labs - Module15: Hacking Wireless Networks.
Cehv8 Labs - Module15: Hacking Wireless Networks.Vuz Dở Hơi
 
Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7VCP Muthukrishna
 
Cehv8 Labs - Module07: Viruses and Worms.
Cehv8 Labs - Module07: Viruses and Worms.Cehv8 Labs - Module07: Viruses and Worms.
Cehv8 Labs - Module07: Viruses and Worms.Vuz Dở Hơi
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionMazenetsolution
 
CCNAv5 - S1: Chapter11 It's A Network
CCNAv5 - S1: Chapter11 It's A NetworkCCNAv5 - S1: Chapter11 It's A Network
CCNAv5 - S1: Chapter11 It's A NetworkVuz Dở Hơi
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionMazenetsolution
 

Viewers also liked (14)

Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
 
Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.
Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.
Cehv8 Labs - Module17: Evading IDS, Firewalls and Honeypots.
 
Static testing techniques
Static testing techniquesStatic testing techniques
Static testing techniques
 
Java - Servlet - Mazenet Solution
Java - Servlet - Mazenet SolutionJava - Servlet - Mazenet Solution
Java - Servlet - Mazenet Solution
 
Software Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet SolutionSoftware Testing - Tool support for testing (CAST) - Mazenet Solution
Software Testing - Tool support for testing (CAST) - Mazenet Solution
 
Java- Updates in java8-Mazenet solution
Java- Updates in java8-Mazenet solutionJava- Updates in java8-Mazenet solution
Java- Updates in java8-Mazenet solution
 
Java- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solutionJava- Java tech overview- Mazenet solution
Java- Java tech overview- Mazenet solution
 
Cehv8 Labs - Module15: Hacking Wireless Networks.
Cehv8 Labs - Module15: Hacking Wireless Networks.Cehv8 Labs - Module15: Hacking Wireless Networks.
Cehv8 Labs - Module15: Hacking Wireless Networks.
 
Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
 
Cehv8 Labs - Module07: Viruses and Worms.
Cehv8 Labs - Module07: Viruses and Worms.Cehv8 Labs - Module07: Viruses and Worms.
Cehv8 Labs - Module07: Viruses and Worms.
 
Java- JDBC- Mazenet Solution
Java- JDBC- Mazenet SolutionJava- JDBC- Mazenet Solution
Java- JDBC- Mazenet Solution
 
CCNAv5 - S1: Chapter11 It's A Network
CCNAv5 - S1: Chapter11 It's A NetworkCCNAv5 - S1: Chapter11 It's A Network
CCNAv5 - S1: Chapter11 It's A Network
 
Red Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet SolutionRed Hat - LVM - Mazenet Solution
Red Hat - LVM - Mazenet Solution
 

Similar to Oracle- Introduction to Sql commands- Mazenet solution

DDL. data defination language for creating database
DDL. data defination language for creating databaseDDL. data defination language for creating database
DDL. data defination language for creating databaseSHAKIR325211
 
Introducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeIntroducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeMorgan Tocker
 
Dbms oracle
Dbms oracle Dbms oracle
Dbms oracle Abrar ali
 
Les10[1]Creating and Managing Tables
Les10[1]Creating and Managing TablesLes10[1]Creating and Managing Tables
Les10[1]Creating and Managing Tablessiavosh kaviani
 
Creating and Managing Tables -Oracle Data base
Creating and Managing Tables -Oracle Data base Creating and Managing Tables -Oracle Data base
Creating and Managing Tables -Oracle Data base Salman Memon
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 

Similar to Oracle- Introduction to Sql commands- Mazenet solution (20)

8. sql
8. sql8. sql
8. sql
 
Sql statements function join
Sql statements function joinSql statements function join
Sql statements function join
 
DDL. data defination language for creating database
DDL. data defination language for creating databaseDDL. data defination language for creating database
DDL. data defination language for creating database
 
Dbms &amp; oracle
Dbms &amp; oracleDbms &amp; oracle
Dbms &amp; oracle
 
plsql Les09
 plsql Les09 plsql Les09
plsql Les09
 
Introducing Spirit - Online Schema Change
Introducing Spirit - Online Schema ChangeIntroducing Spirit - Online Schema Change
Introducing Spirit - Online Schema Change
 
SQL introduction
SQL introductionSQL introduction
SQL introduction
 
SQL LECTURE.pptx
SQL LECTURE.pptxSQL LECTURE.pptx
SQL LECTURE.pptx
 
Unit - II.pptx
Unit - II.pptxUnit - II.pptx
Unit - II.pptx
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
SQL_NOTES.pdf
SQL_NOTES.pdfSQL_NOTES.pdf
SQL_NOTES.pdf
 
Dbms oracle
Dbms oracle Dbms oracle
Dbms oracle
 
Pl sql guide
Pl sql guidePl sql guide
Pl sql guide
 
DBMS Chapter-3.ppsx
DBMS Chapter-3.ppsxDBMS Chapter-3.ppsx
DBMS Chapter-3.ppsx
 
Overview of Oracle database12c for developers
Overview of Oracle database12c for developersOverview of Oracle database12c for developers
Overview of Oracle database12c for developers
 
Les10[1]Creating and Managing Tables
Les10[1]Creating and Managing TablesLes10[1]Creating and Managing Tables
Les10[1]Creating and Managing Tables
 
Les09
Les09Les09
Les09
 
Creating and Managing Tables -Oracle Data base
Creating and Managing Tables -Oracle Data base Creating and Managing Tables -Oracle Data base
Creating and Managing Tables -Oracle Data base
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 

More from Mazenetsolution

Tally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet TechnologiesTally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet TechnologiesMazenetsolution
 
Tally Auto SMS Module| Mazenet Technologies
Tally Auto SMS  Module| Mazenet TechnologiesTally Auto SMS  Module| Mazenet Technologies
Tally Auto SMS Module| Mazenet TechnologiesMazenetsolution
 
Tally auto synchronization
Tally auto synchronization Tally auto synchronization
Tally auto synchronization Mazenetsolution
 
Print barcode using voucher- Mazenettechnologies
Print barcode using voucher- MazenettechnologiesPrint barcode using voucher- Mazenettechnologies
Print barcode using voucher- MazenettechnologiesMazenetsolution
 
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | MazenetCopy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | MazenetMazenetsolution
 
Auto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet TechnologiesAuto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet TechnologiesMazenetsolution
 
Auto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally SoftwareAuto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally SoftwareMazenetsolution
 
Mazenet Technologies-Tally
Mazenet Technologies-TallyMazenet Technologies-Tally
Mazenet Technologies-TallyMazenetsolution
 
Android - Intents - Mazenet Solution
Android - Intents - Mazenet SolutionAndroid - Intents - Mazenet Solution
Android - Intents - Mazenet SolutionMazenetsolution
 
Software Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet SolutionSoftware Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet SolutionMazenetsolution
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionPHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionMazenetsolution
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linuxMazenetsolution
 
Software Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionSoftware Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionMazenetsolution
 
Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7Mazenetsolution
 

More from Mazenetsolution (14)

Tally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet TechnologiesTally Auto E-mail Module | Mazenet Technologies
Tally Auto E-mail Module | Mazenet Technologies
 
Tally Auto SMS Module| Mazenet Technologies
Tally Auto SMS  Module| Mazenet TechnologiesTally Auto SMS  Module| Mazenet Technologies
Tally Auto SMS Module| Mazenet Technologies
 
Tally auto synchronization
Tally auto synchronization Tally auto synchronization
Tally auto synchronization
 
Print barcode using voucher- Mazenettechnologies
Print barcode using voucher- MazenettechnologiesPrint barcode using voucher- Mazenettechnologies
Print barcode using voucher- Mazenettechnologies
 
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | MazenetCopy user list | Tally | Tally Software | Accounting Software | Mazenet
Copy user list | Tally | Tally Software | Accounting Software | Mazenet
 
Auto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet TechnologiesAuto synchronization | Tally Software | Mazenet Technologies
Auto synchronization | Tally Software | Mazenet Technologies
 
Auto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally SoftwareAuto backup | Tally Coimbatore | Tally Software
Auto backup | Tally Coimbatore | Tally Software
 
Mazenet Technologies-Tally
Mazenet Technologies-TallyMazenet Technologies-Tally
Mazenet Technologies-Tally
 
Android - Intents - Mazenet Solution
Android - Intents - Mazenet SolutionAndroid - Intents - Mazenet Solution
Android - Intents - Mazenet Solution
 
Software Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet SolutionSoftware Testing - Test management - Mazenet Solution
Software Testing - Test management - Mazenet Solution
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionPHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet Solution
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
Software Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solutionSoftware Testing-Dynamic testing technique-Mazenet solution
Software Testing-Dynamic testing technique-Mazenet solution
 
Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7
 

Recently uploaded

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Oracle- Introduction to Sql commands- Mazenet solution

  • 1. INTRODUCTION TO SQL Prepared by Ravichandiran Senior Oracle Trainer
  • 2. WHY MAZENET? • Oracle Certified Partner & more than 10+ years experienced Trainers. • Oracle unique id for students • E-kits from Oracle University • Course Completion Certificate from Oracle University. • Flexible timing for working professionals. • Preparing candidates to face interview and free resume preparation.
  • 3. COMMANDS DDL - DATA DEFINITION LANUGAGE DML - DATA MANIPULATION LANGUAGE TCL - TRANSACTION CONTROL LANGUAGE DCL - DATA CONTROL LANGUAGE DRL - DATA RETRIEVAL LANGUAGE
  • 4. DDL • Used to create or modify the structure of the table. • Auto commit occurs. Changes cannot be rolled back. • Session independent commands. • Commands are : CREATE, ALTER DROP, TRUNCATE, RENAME
  • 5. DDL - CREATE SYNTAX create table <tab_name> ( col1 datatype(size), col2 datatype(size), ........... ............. coln datatype(size) ); SYNTAX create table <tab_name> ( col1 datatype(size), col2 datatype(size), ........... ............. coln datatype(size) ); EXAMPLE Create table emp ( empno number(5), ename varchar2(20), job varchar2(20) ); EXAMPLE Create table emp ( empno number(5), ename varchar2(20), job varchar2(20) );
  • 6. DDL - ALTER ADD • ALTER TABLE EMP ADD DOJ DATE; • ALTER TABLE EMP ADD ( SALARY NUMBER(5), COMM NUMBER(4), DEPTNO NUMBER(3)); ADD • ALTER TABLE EMP ADD DOJ DATE; • ALTER TABLE EMP ADD ( SALARY NUMBER(5), COMM NUMBER(4), DEPTNO NUMBER(3)); MODIFY • ALTER TABLE EMP ADD DOJ DATE; • ALTER TABLE EMP ADD ( SALARY NUMBER(5), COMM NUMBER(4), DEPTNO NUMBER(3)); MODIFY • ALTER TABLE EMP ADD DOJ DATE; • ALTER TABLE EMP ADD ( SALARY NUMBER(5), COMM NUMBER(4), DEPTNO NUMBER(3));
  • 7. DDL - ALTER DROP COLUMN • ALTER TABLE EMP DROP COLUMN DEPTNO; • ALTER TABLE EMP DROP(DOJ,COMM); DROP COLUMN • ALTER TABLE EMP DROP COLUMN DEPTNO; • ALTER TABLE EMP DROP(DOJ,COMM); RENAME COLUMN • ALTER TABLE EMP RENAME COLUMN EMPNO TO ENO; RENAME COLUMN • ALTER TABLE EMP RENAME COLUMN EMPNO TO ENO;
  • 8. DDL - DROP TABLE DROPPED • DROP TABLE EMP; • DROP TABLE EMP PURGE; • PURGE RECYCLEBIN; • PURGE TABLE EMP; TABLE DROPPED • DROP TABLE EMP; • DROP TABLE EMP PURGE; • PURGE RECYCLEBIN; • PURGE TABLE EMP; FLASHBACK COMMAND • Flashback table emp to before drop; • Flashback table emp to before drop rename to employees; FLASHBACK COMMAND • Flashback table emp to before drop; • Flashback table emp to before drop rename to employees;
  • 9. DDL - TRUNCATE • Used to remove records from table. • Cannot delete single row alone • Changes are permanent. So deleted record cannot be rolled back. TRUNCATE TABLE EMP;
  • 10. DDL - RENAME • Used to rename the table. RENAME <OLD_TABLE_NAME> TO <NEW_TAB_NAME>; RENAME EMP TO EMPLOYEES;