SlideShare a Scribd company logo
2
Most read
4
Most read
6
Most read
Program No. # 02
Object :- Write SQL Queries for DML (Data Manipulation Language) Statement.
DML Commands:-
 INSERT Query
 SELECT Query
 UPDATE Query
 DELETE Query
1. INSERT Command:- INSERT command is used to insert data into a table.
Following is the syntax:-
Example:-
COMMIT is a transactional control key word that saves the entered data.
2. SELECT Command:- SELECT statement is used to retrieve data from one or
more objects within a database.
INSERT INTO table_name VALUES (data_1, data_2,….data_n);
INSERT INTO STUDENT VALUES (9002, Monish , 23)
INSERT INTO STUDENT VALUES (9003, Shubham, 19);
INSERT INTO STUDENT VALUES (9004, Shubham Kumar, 19);
INSERT INTO STUDENT VALUES (9005, Sumit Kumar, 21);
COMMIT;
Following is the syntax:-
Example:-
3. UPDATE Command:- UPDATE command is used to update any record of data
in a table.
Following is the Syntax:-
Example:-
4. DELETE Command:- DELETE command is used to delete data from a table.
Following is the syntax:-
Delete all Records from table:-
SELECT column_name FROM table_name ;
SELECT AGE FROM STUDENT ;
UPDATE table_name SET column_name = ‘Input_Value’
WHERE condition ;
UPDATE STUDENT SET AGE = 21
WHERE Roll_No. = 9005 ;
DELETE FROM table_name ;
Example:-
Delete a particular Record From Table:-
Syntax:-
Example:-
DELETE FROM Student ;
DELETE FROM table_name WHERE Condition ;
DELETE FROM STUDENT WHERE Roll_No = 9002;
SQL Queries - DML Commands
SQL Queries - DML Commands
SQL Queries - DML Commands
SQL Queries - DML Commands

More Related Content

PPTX
Sql queries presentation
PPTX
SQL Queries Information
PDF
Packages - PL/SQL
PDF
Sql Basics | Edureka
PPTX
What is SQL Server?
PDF
Singly Linked List
PPT
SQL select statement and functions
Sql queries presentation
SQL Queries Information
Packages - PL/SQL
Sql Basics | Edureka
What is SQL Server?
Singly Linked List
SQL select statement and functions

What's hot (20)

PDF
SQL Queries - DDL Commands
PDF
PLSQL CURSOR
PPTX
Basic sql Commands
PPTX
linked list
PPT
SQL DDL
PPT
skip list
PPTX
Stack and its Applications : Data Structures ADT
PDF
View & index in SQL
PPSX
Data Structure (Stack)
PDF
PL/SQL TRIGGERS
PPTX
Procedure and Functions in pl/sql
PPTX
Oracle: Joins
PDF
Normalization in SQL | Edureka
PPTX
SQL Operators.pptx
PPT
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
PPTX
SQL - Structured query language introduction
PPTX
Sql Functions And Procedures
PPTX
introdution to SQL and SQL functions
PPTX
Queues in C++
SQL Queries - DDL Commands
PLSQL CURSOR
Basic sql Commands
linked list
SQL DDL
skip list
Stack and its Applications : Data Structures ADT
View & index in SQL
Data Structure (Stack)
PL/SQL TRIGGERS
Procedure and Functions in pl/sql
Oracle: Joins
Normalization in SQL | Edureka
SQL Operators.pptx
Database Normalization 1NF, 2NF, 3NF, BCNF, 4NF, 5NF
SQL - Structured query language introduction
Sql Functions And Procedures
introdution to SQL and SQL functions
Queues in C++
Ad

Similar to SQL Queries - DML Commands (20)

PPTX
GFGC CHIKKABASUR ( DML COMMANDS )
PPTX
Database Languages power point presentation
PPTX
DML DATA MAINUPULATION LANGUAGE
PPTX
data manipulation language
DOCX
PPTX
Himani uppal-221302130 WP ppt.pptx
PPTX
SQL-SHORT-NOTES.pptx
PPT
database slide
PDF
sql all type of commands in this power point presentation
PDF
COMMANDS PPT(1).pdf
PPTX
SQL commands
PPTX
BWU_BTA_22_403_Aishika Majumdar and all about cse
PPTX
Ddl & dml commands
PPTX
Data Definition and Data Manipulation Language-DDL & DML
PDF
ppt.pdf
PPTX
database language ppt.pptx
PDF
SQL Basics, DDL, DML, DQL, Learn The BAsics Of SQL.pdf
PDF
Data manipulation language
PPTX
MIS 301 RELATIONAL DATABASE MANAGEMENT SYSTEM 10,11&12.pptx
GFGC CHIKKABASUR ( DML COMMANDS )
Database Languages power point presentation
DML DATA MAINUPULATION LANGUAGE
data manipulation language
Himani uppal-221302130 WP ppt.pptx
SQL-SHORT-NOTES.pptx
database slide
sql all type of commands in this power point presentation
COMMANDS PPT(1).pdf
SQL commands
BWU_BTA_22_403_Aishika Majumdar and all about cse
Ddl & dml commands
Data Definition and Data Manipulation Language-DDL & DML
ppt.pdf
database language ppt.pptx
SQL Basics, DDL, DML, DQL, Learn The BAsics Of SQL.pdf
Data manipulation language
MIS 301 RELATIONAL DATABASE MANAGEMENT SYSTEM 10,11&12.pptx
Ad

Recently uploaded (20)

PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPT
Mechanical Engineering MATERIALS Selection
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
OOP with Java - Java Introduction (Basics)
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Well-logging-methods_new................
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Sustainable Sites - Green Building Construction
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Mechanical Engineering MATERIALS Selection
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
OOP with Java - Java Introduction (Basics)
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Well-logging-methods_new................
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Arduino robotics embedded978-1-4302-3184-4.pdf
Strings in CPP - Strings in C++ are sequences of characters used to store and...
UNIT 4 Total Quality Management .pptx
Sustainable Sites - Green Building Construction
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...

SQL Queries - DML Commands

  • 1. Program No. # 02 Object :- Write SQL Queries for DML (Data Manipulation Language) Statement. DML Commands:-  INSERT Query  SELECT Query  UPDATE Query  DELETE Query 1. INSERT Command:- INSERT command is used to insert data into a table. Following is the syntax:- Example:- COMMIT is a transactional control key word that saves the entered data. 2. SELECT Command:- SELECT statement is used to retrieve data from one or more objects within a database. INSERT INTO table_name VALUES (data_1, data_2,….data_n); INSERT INTO STUDENT VALUES (9002, Monish , 23) INSERT INTO STUDENT VALUES (9003, Shubham, 19); INSERT INTO STUDENT VALUES (9004, Shubham Kumar, 19); INSERT INTO STUDENT VALUES (9005, Sumit Kumar, 21); COMMIT;
  • 2. Following is the syntax:- Example:- 3. UPDATE Command:- UPDATE command is used to update any record of data in a table. Following is the Syntax:- Example:- 4. DELETE Command:- DELETE command is used to delete data from a table. Following is the syntax:- Delete all Records from table:- SELECT column_name FROM table_name ; SELECT AGE FROM STUDENT ; UPDATE table_name SET column_name = ‘Input_Value’ WHERE condition ; UPDATE STUDENT SET AGE = 21 WHERE Roll_No. = 9005 ; DELETE FROM table_name ;
  • 3. Example:- Delete a particular Record From Table:- Syntax:- Example:- DELETE FROM Student ; DELETE FROM table_name WHERE Condition ; DELETE FROM STUDENT WHERE Roll_No = 9002;