SlideShare a Scribd company logo
1 of 18
WEB DEVELOPMENT
PHP
PRESENTATORS
MD. AL-MAMUN SARKAR
SQL
Structured Query Language
Why SQL
๏ƒ˜Execute queries against a database
๏ƒ˜Retrieve data from a database
๏ƒ˜Insert records in a database
๏ƒ˜Update records in a database
๏ƒ˜Delete records from a database
๏ƒ˜Create new databases
๏ƒ˜Create new tables in a database
๏ƒ˜Create views in a database
Important SQL Commands
๏ถ SELECT - extracts data from a database
๏ถ UPDATE - updates data in a database
๏ถ DELETE - deletes data from a database
๏ถ INSERT INTO - inserts new data into a database
๏ถ CREATE DATABASE - creates a new database
๏ถ ALTER DATABASE - modifies a database
๏ถ CREATE TABLE - creates a new table
๏ถ ALTER TABLE - modifies a table
๏ถ DROP TABLE - deletes a table
๏ถ CREATE INDEX - creates an index (search key)
๏ถ DROP INDEX - deletes an index
Select
SELECT * FROM table_name;
SELECT column1, column2, ...
FROM table_name;
SELECT DISTINCT
SELECT DISTINCT column_name FROM
table_name;
WHERE Clause
SELECT column1, column2, ...
FROM table_name
WHERE condition;
Example:
SELECT * FROM students
WHERE age='15';
Operators
๏ถ = Equal
๏ถ <> Not equal. Note: ( != )
๏ถ > Greater than
๏ถ < Less than
๏ถ >= Greater than or equal
๏ถ <= Less than or equal
๏ถ BETWEEN Between an inclusive range
๏ถ LIKE Search for a pattern
๏ถ IN To specify multiple possible values for a column
AND, OR and NOT
AND
SELECT * FROM table_name
WHERE condition1 AND condition2 AND condition3;
OR
SELECT * FROM table_name
WHERE condition1 OR condition2 OR condition3 ;
NOT
SELECT * FROM table_name
WHERE NOT condition;
ORDER BY
SELECT column1, column2, ...
FROM table_name
ORDER BY column ASC/DESC;
Example:
SELECT * FROM students ORDER BY id;
SELECT * FROM students ORDER BY id ASC;
SELECT * FROM students ORDER BY id DESC;
NULL
SELECT column_names
FROM table_name
WHERE column_name IS NULL;
SELECT column_names
FROM table_name
WHERE column_name IS NOT NULL;
INSERT
INSERT INTO table_name (column1, column2,
column3, ...)
VALUES (value1, value2, value3, ...);
INSERT INTO table_name
VALUES (value1, value2, value3, ...);
UPDATE
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
DELETE
DELETE FROM table_name
WHERE condition;
DELETE FROM table_name;
DELETE * FROM table_name;
QUESTION
?
THANK
YOU

More Related Content

What's hot (20)

SQL
SQLSQL
SQL
ย 
Sql commands
Sql commandsSql commands
Sql commands
ย 
Joins in SQL
Joins in SQLJoins in SQL
Joins in SQL
ย 
SQL Views
SQL ViewsSQL Views
SQL Views
ย 
sql function(ppt)
sql function(ppt)sql function(ppt)
sql function(ppt)
ย 
Sql commands
Sql commandsSql commands
Sql commands
ย 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
ย 
SQL Joins.pptx
SQL Joins.pptxSQL Joins.pptx
SQL Joins.pptx
ย 
Sql ppt
Sql pptSql ppt
Sql ppt
ย 
5. stored procedure and functions
5. stored procedure and functions5. stored procedure and functions
5. stored procedure and functions
ย 
Stored procedure
Stored procedureStored procedure
Stored procedure
ย 
SQL JOIN
SQL JOINSQL JOIN
SQL JOIN
ย 
DML Commands
DML CommandsDML Commands
DML Commands
ย 
Create table
Create tableCreate table
Create table
ย 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
ย 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
ย 
Database Triggers
Database TriggersDatabase Triggers
Database Triggers
ย 
Procedure and Functions in pl/sql
Procedure and Functions in pl/sqlProcedure and Functions in pl/sql
Procedure and Functions in pl/sql
ย 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
ย 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
ย 

Similar to Database Management - Lecture 2 - SQL select, insert, update and delete

Avinash database
Avinash databaseAvinash database
Avinash databaseavibmas
ย 
Farheen abdul hameed ip project (MY SQL);
Farheen abdul hameed ip project (MY SQL);Farheen abdul hameed ip project (MY SQL);
Farheen abdul hameed ip project (MY SQL);abdul talha
ย 
Sql Basics | Edureka
Sql Basics | EdurekaSql Basics | Edureka
Sql Basics | EdurekaEdureka!
ย 
MySQL.pptx comuterscience from kvsbbsrs.
MySQL.pptx comuterscience from kvsbbsrs.MySQL.pptx comuterscience from kvsbbsrs.
MySQL.pptx comuterscience from kvsbbsrs.sudhasuryasnata06
ย 
SQL Tutorial for Beginners
SQL Tutorial for BeginnersSQL Tutorial for Beginners
SQL Tutorial for BeginnersAbdelhay Shafi
ย 
SQL : Structured Query Language
SQL : Structured Query LanguageSQL : Structured Query Language
SQL : Structured Query LanguageAbhishek Gautam
ย 
Mysql 120831075600-phpapp01
Mysql 120831075600-phpapp01Mysql 120831075600-phpapp01
Mysql 120831075600-phpapp01sagaroceanic11
ย 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL Rc Os
ย 
Its about a sql topic for basic structured query language
Its about a sql topic for basic structured query languageIts about a sql topic for basic structured query language
Its about a sql topic for basic structured query languageIMsKanchanaI
ย 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxjainendraKUMAR55
ย 
SQL | DML
SQL | DMLSQL | DML
SQL | DMLTo Sum It Up
ย 
MY SQL
MY SQLMY SQL
MY SQLsundar
ย 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commandsBelle Wx
ย 
Mysql Statments
Mysql StatmentsMysql Statments
Mysql StatmentsSHC
ย 

Similar to Database Management - Lecture 2 - SQL select, insert, update and delete (20)

Avinash database
Avinash databaseAvinash database
Avinash database
ย 
Farheen abdul hameed ip project (MY SQL);
Farheen abdul hameed ip project (MY SQL);Farheen abdul hameed ip project (MY SQL);
Farheen abdul hameed ip project (MY SQL);
ย 
Query
QueryQuery
Query
ย 
Sql Basics | Edureka
Sql Basics | EdurekaSql Basics | Edureka
Sql Basics | Edureka
ย 
SQL
SQLSQL
SQL
ย 
MySQL.pptx comuterscience from kvsbbsrs.
MySQL.pptx comuterscience from kvsbbsrs.MySQL.pptx comuterscience from kvsbbsrs.
MySQL.pptx comuterscience from kvsbbsrs.
ย 
SQL
SQLSQL
SQL
ย 
SQL
SQLSQL
SQL
ย 
SQL Tutorial for Beginners
SQL Tutorial for BeginnersSQL Tutorial for Beginners
SQL Tutorial for Beginners
ย 
SQL : Structured Query Language
SQL : Structured Query LanguageSQL : Structured Query Language
SQL : Structured Query Language
ย 
Mysql 120831075600-phpapp01
Mysql 120831075600-phpapp01Mysql 120831075600-phpapp01
Mysql 120831075600-phpapp01
ย 
Hira
HiraHira
Hira
ย 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
ย 
Its about a sql topic for basic structured query language
Its about a sql topic for basic structured query languageIts about a sql topic for basic structured query language
Its about a sql topic for basic structured query language
ย 
Lab
LabLab
Lab
ย 
DBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptxDBMS and SQL(structured query language) .pptx
DBMS and SQL(structured query language) .pptx
ย 
SQL | DML
SQL | DMLSQL | DML
SQL | DML
ย 
MY SQL
MY SQLMY SQL
MY SQL
ย 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
ย 
Mysql Statments
Mysql StatmentsMysql Statments
Mysql Statments
ย 

More from Al-Mamun Sarkar

01 Introductions to System Design
01 Introductions to System Design01 Introductions to System Design
01 Introductions to System DesignAl-Mamun Sarkar
ย 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learningAl-Mamun Sarkar
ย 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Al-Mamun Sarkar
ย 
Understanding Wordpress Plugn and Theme users' behavior
Understanding Wordpress Plugn and Theme users' behaviorUnderstanding Wordpress Plugn and Theme users' behavior
Understanding Wordpress Plugn and Theme users' behaviorAl-Mamun Sarkar
ย 
Database Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and MysqlDatabase Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and MysqlAl-Mamun Sarkar
ย 
Database Management - Lecture 3 - SQL Aggregate Functions, Join
Database Management - Lecture 3 - SQL Aggregate Functions, JoinDatabase Management - Lecture 3 - SQL Aggregate Functions, Join
Database Management - Lecture 3 - SQL Aggregate Functions, JoinAl-Mamun Sarkar
ย 
Database Management - Lecture 1
Database Management - Lecture 1 Database Management - Lecture 1
Database Management - Lecture 1 Al-Mamun Sarkar
ย 
PHP Lecture 6 - Php file uploading
PHP Lecture 6 - Php file uploadingPHP Lecture 6 - Php file uploading
PHP Lecture 6 - Php file uploadingAl-Mamun Sarkar
ย 
PHP Lecture 5 - Date time, Include, session
PHP Lecture 5 - Date time, Include, sessionPHP Lecture 5 - Date time, Include, session
PHP Lecture 5 - Date time, Include, sessionAl-Mamun Sarkar
ย 
PHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post MethodsPHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post MethodsAl-Mamun Sarkar
ย 
PHP Lecture 3 - Functions
PHP Lecture 3 - FunctionsPHP Lecture 3 - Functions
PHP Lecture 3 - FunctionsAl-Mamun Sarkar
ย 
PHP Lecture 2 - Conditional Statement, Loop
PHP Lecture 2 - Conditional Statement, LoopPHP Lecture 2 - Conditional Statement, Loop
PHP Lecture 2 - Conditional Statement, LoopAl-Mamun Sarkar
ย 
PHP Lecture 1 - String, Constants, Arrays, Operators
PHP Lecture 1 - String, Constants, Arrays, OperatorsPHP Lecture 1 - String, Constants, Arrays, Operators
PHP Lecture 1 - String, Constants, Arrays, OperatorsAl-Mamun Sarkar
ย 
Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...
Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...
Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...Al-Mamun Sarkar
ย 
Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...
Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...
Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...Al-Mamun Sarkar
ย 
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tablesWeb Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tablesAl-Mamun Sarkar
ย 
Web Design Course - Lecture 11 - CSS3, Border radius, Box shadow
Web Design Course - Lecture 11 - CSS3, Border radius, Box shadowWeb Design Course - Lecture 11 - CSS3, Border radius, Box shadow
Web Design Course - Lecture 11 - CSS3, Border radius, Box shadowAl-Mamun Sarkar
ย 
Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...
Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...
Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...Al-Mamun Sarkar
ย 
Web Design Course - Lecture 9 - Border, Padding and Margin, Display
Web Design Course - Lecture 9 - Border, Padding and Margin, DisplayWeb Design Course - Lecture 9 - Border, Padding and Margin, Display
Web Design Course - Lecture 9 - Border, Padding and Margin, DisplayAl-Mamun Sarkar
ย 
Web Design Course - Lecture 7 - Basic Css
Web Design Course - Lecture 7 - Basic CssWeb Design Course - Lecture 7 - Basic Css
Web Design Course - Lecture 7 - Basic CssAl-Mamun Sarkar
ย 

More from Al-Mamun Sarkar (20)

01 Introductions to System Design
01 Introductions to System Design01 Introductions to System Design
01 Introductions to System Design
ย 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
ย 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
ย 
Understanding Wordpress Plugn and Theme users' behavior
Understanding Wordpress Plugn and Theme users' behaviorUnderstanding Wordpress Plugn and Theme users' behavior
Understanding Wordpress Plugn and Theme users' behavior
ย 
Database Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and MysqlDatabase Management - Lecture 4 - PHP and Mysql
Database Management - Lecture 4 - PHP and Mysql
ย 
Database Management - Lecture 3 - SQL Aggregate Functions, Join
Database Management - Lecture 3 - SQL Aggregate Functions, JoinDatabase Management - Lecture 3 - SQL Aggregate Functions, Join
Database Management - Lecture 3 - SQL Aggregate Functions, Join
ย 
Database Management - Lecture 1
Database Management - Lecture 1 Database Management - Lecture 1
Database Management - Lecture 1
ย 
PHP Lecture 6 - Php file uploading
PHP Lecture 6 - Php file uploadingPHP Lecture 6 - Php file uploading
PHP Lecture 6 - Php file uploading
ย 
PHP Lecture 5 - Date time, Include, session
PHP Lecture 5 - Date time, Include, sessionPHP Lecture 5 - Date time, Include, session
PHP Lecture 5 - Date time, Include, session
ย 
PHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post MethodsPHP Lecture 4 - Working with form, GET and Post Methods
PHP Lecture 4 - Working with form, GET and Post Methods
ย 
PHP Lecture 3 - Functions
PHP Lecture 3 - FunctionsPHP Lecture 3 - Functions
PHP Lecture 3 - Functions
ย 
PHP Lecture 2 - Conditional Statement, Loop
PHP Lecture 2 - Conditional Statement, LoopPHP Lecture 2 - Conditional Statement, Loop
PHP Lecture 2 - Conditional Statement, Loop
ย 
PHP Lecture 1 - String, Constants, Arrays, Operators
PHP Lecture 1 - String, Constants, Arrays, OperatorsPHP Lecture 1 - String, Constants, Arrays, Operators
PHP Lecture 1 - String, Constants, Arrays, Operators
ย 
Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...
Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...
Web Design Course - Lecture 21 - Bootstrap Jumbotron, Thumbnails, Alerts, Pro...
ย 
Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...
Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...
Web Design Course - Lecture 20 - Bootstrap Dropdown, Button group, Input grou...
ย 
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tablesWeb Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
Web Design Course - Lecture 18 - Boostrap, Gatting started, grid system, tables
ย 
Web Design Course - Lecture 11 - CSS3, Border radius, Box shadow
Web Design Course - Lecture 11 - CSS3, Border radius, Box shadowWeb Design Course - Lecture 11 - CSS3, Border radius, Box shadow
Web Design Course - Lecture 11 - CSS3, Border radius, Box shadow
ย 
Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...
Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...
Web Design Course - Lecture 10 - Floating, Align, navigation bar, Image galle...
ย 
Web Design Course - Lecture 9 - Border, Padding and Margin, Display
Web Design Course - Lecture 9 - Border, Padding and Margin, DisplayWeb Design Course - Lecture 9 - Border, Padding and Margin, Display
Web Design Course - Lecture 9 - Border, Padding and Margin, Display
ย 
Web Design Course - Lecture 7 - Basic Css
Web Design Course - Lecture 7 - Basic CssWeb Design Course - Lecture 7 - Basic Css
Web Design Course - Lecture 7 - Basic Css
ย 

Recently uploaded

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
ย 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
ย 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...OnePlan Solutions
ย 
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธDelhi Call girls
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
ย 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
ย 
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Steffen Staab
ย 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
ย 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
ย 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
ย 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
ย 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
ย 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
ย 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
ย 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto Gonzรกlez Trastoy
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
ย 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
ย 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
ย 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlanโ€™s ...
ย 
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธcall girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
call girls in Vaishali (Ghaziabad) ๐Ÿ” >เผ’8448380779 ๐Ÿ” genuine Escort Service ๐Ÿ”โœ”๏ธโœ”๏ธ
ย 
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS LiveVip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
ย 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
ย 
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
ย 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
ย 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ย 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
ย 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
ย 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
ย 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female serviceCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Badshah Nagar Lucknow best Female service
ย 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
ย 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
ย 

Database Management - Lecture 2 - SQL select, insert, update and delete

  • 3. SQL
  • 5. Why SQL ๏ƒ˜Execute queries against a database ๏ƒ˜Retrieve data from a database ๏ƒ˜Insert records in a database ๏ƒ˜Update records in a database ๏ƒ˜Delete records from a database ๏ƒ˜Create new databases ๏ƒ˜Create new tables in a database ๏ƒ˜Create views in a database
  • 6. Important SQL Commands ๏ถ SELECT - extracts data from a database ๏ถ UPDATE - updates data in a database ๏ถ DELETE - deletes data from a database ๏ถ INSERT INTO - inserts new data into a database ๏ถ CREATE DATABASE - creates a new database ๏ถ ALTER DATABASE - modifies a database ๏ถ CREATE TABLE - creates a new table ๏ถ ALTER TABLE - modifies a table ๏ถ DROP TABLE - deletes a table ๏ถ CREATE INDEX - creates an index (search key) ๏ถ DROP INDEX - deletes an index
  • 7. Select SELECT * FROM table_name; SELECT column1, column2, ... FROM table_name;
  • 8. SELECT DISTINCT SELECT DISTINCT column_name FROM table_name;
  • 9. WHERE Clause SELECT column1, column2, ... FROM table_name WHERE condition; Example: SELECT * FROM students WHERE age='15';
  • 10. Operators ๏ถ = Equal ๏ถ <> Not equal. Note: ( != ) ๏ถ > Greater than ๏ถ < Less than ๏ถ >= Greater than or equal ๏ถ <= Less than or equal ๏ถ BETWEEN Between an inclusive range ๏ถ LIKE Search for a pattern ๏ถ IN To specify multiple possible values for a column
  • 11. AND, OR and NOT AND SELECT * FROM table_name WHERE condition1 AND condition2 AND condition3; OR SELECT * FROM table_name WHERE condition1 OR condition2 OR condition3 ; NOT SELECT * FROM table_name WHERE NOT condition;
  • 12. ORDER BY SELECT column1, column2, ... FROM table_name ORDER BY column ASC/DESC; Example: SELECT * FROM students ORDER BY id; SELECT * FROM students ORDER BY id ASC; SELECT * FROM students ORDER BY id DESC;
  • 13. NULL SELECT column_names FROM table_name WHERE column_name IS NULL; SELECT column_names FROM table_name WHERE column_name IS NOT NULL;
  • 14. INSERT INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...); INSERT INTO table_name VALUES (value1, value2, value3, ...);
  • 15. UPDATE UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition;
  • 16. DELETE DELETE FROM table_name WHERE condition; DELETE FROM table_name; DELETE * FROM table_name;