0% found this document useful (0 votes)
5 views23 pages

2 SQL - DML Commands

The document provides an overview of SQL Data Manipulation Language (DML) commands used for modifying table content, including INSERT, DELETE, UPDATE, and SELECT. It also discusses techniques for selecting records using various conditions and operators, such as WHERE, relational operators, and logical operators. Additionally, it highlights the ability to perform arithmetic operations and updates on table data.

Uploaded by

Sanffred Joju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views23 pages

2 SQL - DML Commands

The document provides an overview of SQL Data Manipulation Language (DML) commands used for modifying table content, including INSERT, DELETE, UPDATE, and SELECT. It also discusses techniques for selecting records using various conditions and operators, such as WHERE, relational operators, and logical operators. Additionally, it highlights the ability to perform arithmetic operations and updates on table data.

Uploaded by

Sanffred Joju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SQL – DML

Data Manipulation Language

This category of SQL commands is used to make modifications in table content or


information stored in a table not the table structure
DBMS - SQL Commands


SQL – Data Manipulation Language

SQL DML – DML commands are used to add, update, delete and display TABLE
Content. DML commands are listed below
• INSERT
• DELETE
• UPDATE
• SELECT

Sample TABLE – Customer_detail

Cust_ID Cust_Last_Name Cust_Mid_Name Cust_First_Name Account_no Account_type Bank_branch Cust_Email

12121 Arun 1202020 [email protected]

13131 Ajay 3122324 [email protected]

14242 Amar 4326165 [email protected]


m
SQL – Data Manipulation Language
SQL – Data Manipulation Language
SQL – Data Manipulation Language
SQL – Data Manipulation Language

Displaying or Selecting Table Content


SQL – Data Manipulation Language
SQL – Data Manipulation Language
SQL – Data Manipulation Language

Selecting records using WHERE clause (condition based selection)


SQL – Data Manipulation Language

Selecting records using WHERE clause (condition based selection)


SQL – Data Manipulation Language

Selecting records using Relational Operators – >, < , <>, !=


SQL – Data Manipulation Language

Selecting records using Relational Operators – >, < , <>, !=


SQL – Data Manipulation Language

Selecting records using LOGICAL Operators – AND, OR, NOT


SQL – Data Manipulation Language

Selecting
Retrievalrecords
usingusing BETWEEN
BETWEEN
SQL – Data Manipulation Language

Retrieval
Selecting using
records IN IN
using
SQL – Data Manipulation Language

Retrieval using LIKE


SQL – Data Manipulation Language

Retrieval using NULL


SQL – Data Manipulation Language
SELECT with Constants and Arithmetic

• Apart from selecting column names, we can also select constants, compute
arithmetic expressions and evaluate functions in a SELECT statement

SELECT Mark/100 FROM Grades

SELECT Salary + Bonus AS ‘Gross Salary’ FROM Employee

SELECT 1.175*Price AS ‘Total Amount to be paid’ FROM Products


SQL – Data Manipulation Language
SQL – Data Manipulation Language
SQL – Data Manipulation Language

SQL UPDATE with and without WHERE clause


SQL – Data Manipulation Language

SQL UPDATE – Updating multiple values (fields/columns)

You might also like