SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Group By, Order By, and Aliases in SQL
Group By, Order By, and Aliases in SQLGroup By, Order By, and Aliases in SQL
Group By, Order By, and Aliases in SQL
 
SQL - Structured query language introduction
SQL - Structured query language introductionSQL - Structured query language introduction
SQL - Structured query language introduction
 
SQL JOINS
SQL JOINSSQL JOINS
SQL JOINS
 
STRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIESSTRUCTURE OF SQL QUERIES
STRUCTURE OF SQL QUERIES
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 
Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In Sql
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
SQL commands
SQL commandsSQL commands
SQL commands
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
Sql subquery
Sql  subquerySql  subquery
Sql subquery
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Language
 
Mysql
MysqlMysql
Mysql
 
SQL BUILT-IN FUNCTION
SQL BUILT-IN FUNCTIONSQL BUILT-IN FUNCTION
SQL BUILT-IN FUNCTION
 
SQL select clause
SQL select clauseSQL select clause
SQL select clause
 
Nested Queries Lecture
Nested Queries LectureNested Queries Lecture
Nested Queries Lecture
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
SQL Functions
SQL FunctionsSQL Functions
SQL Functions
 
SQL
SQLSQL
SQL
 
DML Commands
DML CommandsDML Commands
DML Commands
 

Ähnlich wie 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
 
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
 

Ähnlich wie 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
 
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
 
Sql commands
Sql commandsSql commands
Sql commands
 
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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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
 
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
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
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
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
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
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
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
 

Kürzlich hochgeladen (20)

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
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
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
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
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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...
 
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
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
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
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
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
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
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...
 

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;