SlideShare a Scribd company logo
SQL Tutorial
to use
SELECT, WHERE, Order
by, INSERT, NULL
Functions
By
Avjinder Kaler
(askaler@uark.edu)
SQL is a standard language for storing,
manipulating and retrieving data in databases.
SELECT function for selection purpose in the Table.
• When someone want to select all the columns from the
Customers table.
SELECT * FROM Customers;
* for all columns
• When you want to select only one column, for example the City
column, from the Customers table.
SELECT City FROM Customers;
• When you want to select different values from the Country
column in the Customers table.
SELECT DISTINCT Country FROM Customers;
Where function for selection purpose at specific
place in the Table.
• When you want to select a specific value in a specific column, for
example the "Berlin" value from the City column in the
Customers table.
SELECT * FROM Customers
WHERE City = 'Berlin';
• When you want to select all values other than one specific value
in a specific column, for example the "Not Berlin" value from the
City column in the Customers table.
SELECT * FROM Customers
WHERE City <> 'Berlin';
* These are different operator to use.
• When you want to select one specific number value in a specific
column, for example the "32" value from the CustomerID
column in the Customers table.
SELECT * FROM Customers
WHERE CustomerID = 32;
• When you want to select records from two columns, for example
Berlin value from City column and the value 12209 from
PostalCode column in the Customers table.
SELECT* FROM Customers
WHERE City = 'Berlin'
AND PostalCode = 12209;
• When you want to select two different records from the same
column, for example the value Berlin and the value London from
the City column in the Customers table.
SELECT * FROM Customers
WHERE City = 'Berlin'
OR City = 'London';
Order by function for sorting the records in the
columns in the Table.
• When you want to sort the records alphabetically in a specific
column, for example records in the City column in the Customers
table.
SELECT * FROM Customers
ORDER BY City;
• When you want to sort the records reverse alphabetically in a
specific column, for example records in the City column in the
Customers table.
SELECT * FROM Customers
ORDER BY City DESC;
• When you want to sort the records in two columns, first one
column and then second after that, for example first by the
column Country, then, by the column City in the Customers
table.
SELECT * FROM Customers
ORDER BY Country, City;
Insert function for inserting new records in the
columns in the Table.
• When you want to insert new values the records in different
columns, for example 'Hekkan Burger', ‘Gateveien 15', 'Sandnes',
'4306', 'Norway' new values in the CustomerName, Address,
City, PostalCode, Country columns, respectively, in the
Customers table.
INSERT INTO Customers (
CustomerName,
Address,
City, Columns where new records will be inserted
PostalCode,
Country)
VALUES (
'Hekkan Burger',
'Gateveien 15',
'Sandnes', new records/values
'4306',
'Norway');
Null function for inserting new records in the
columns in the Table.
• When you want to select all empty records from a specific
column, for example empty records in the PostalCode column in
the Customers table.
SELECT * FROM Customers
WHERE PostalCode IS NULL;
• When you want to select all non-empty records from a specific
column, for example non-empty records in the PostalCode
column in the Customers table.
SELECT * FROM Customers
WHERE PostalCode IS NOT NULL;

More Related Content

What's hot

VELODYNE VLP-16
VELODYNE VLP-16VELODYNE VLP-16
VELODYNE VLP-16
Brett Johnson
 
Bluetooth
BluetoothBluetooth
Bluetooth
Sachin Bali
 
GSM Module
GSM ModuleGSM Module
GSM Module
Mohsen Sarakbi
 
Cell phone jammer
Cell phone jammerCell phone jammer
Cell phone jammer
Pula Likhitha
 
smart note taker
smart note takersmart note taker
smart note taker
gayathripokala482
 
Introduction to WDM and TDM
 Introduction to WDM and TDM Introduction to WDM and TDM
Introduction to WDM and TDM
Murtadha ali shukur
 
Gsm Global System For Mobile Comm[1]. Really Nice
Gsm  Global System For Mobile Comm[1].   Really NiceGsm  Global System For Mobile Comm[1].   Really Nice
Gsm Global System For Mobile Comm[1]. Really Nice
er_tiwari
 
TDMA, FDMA, CDMA
TDMA, FDMA, CDMATDMA, FDMA, CDMA
TDMA, FDMA, CDMA
Keerthana Nambiar
 
Introduction to ofdm
Introduction to ofdmIntroduction to ofdm
Introduction to ofdm
aftab alam
 
Time Division Multiplexing
Time Division MultiplexingTime Division Multiplexing
Time Division Multiplexing
Spandit Lenka
 
Analysis of 1G, 2G, 3G & 4G
Analysis of 1G, 2G, 3G & 4GAnalysis of 1G, 2G, 3G & 4G
Analysis of 1G, 2G, 3G & 4G
Prateek Aloni
 
gsm based Voting system
gsm based Voting system gsm based Voting system
gsm based Voting system
sebinkb
 
Pulse Code Modulation (PCM)
Pulse Code Modulation (PCM)Pulse Code Modulation (PCM)
Pulse Code Modulation (PCM)
Arun c
 
Gsm signalling protocol
Gsm signalling protocolGsm signalling protocol
Gsm signalling protocol
Pratit Khare
 
HDTV
HDTVHDTV
Intorduction to cellular communication
Intorduction to cellular communicationIntorduction to cellular communication
Intorduction to cellular communication
Zaahir Salam
 
LTE Advance Pro
LTE Advance ProLTE Advance Pro
LTE Advance Pro
Mohammed Abuibaid
 
Gsm fundamentals
Gsm fundamentalsGsm fundamentals
Gsm fundamentals
Mohamed Sewailam
 

What's hot (20)

VELODYNE VLP-16
VELODYNE VLP-16VELODYNE VLP-16
VELODYNE VLP-16
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
GSM Module
GSM ModuleGSM Module
GSM Module
 
Cell phone jammer
Cell phone jammerCell phone jammer
Cell phone jammer
 
smart note taker
smart note takersmart note taker
smart note taker
 
mang LTE
mang LTEmang LTE
mang LTE
 
Introduction to WDM and TDM
 Introduction to WDM and TDM Introduction to WDM and TDM
Introduction to WDM and TDM
 
Gsm Global System For Mobile Comm[1]. Really Nice
Gsm  Global System For Mobile Comm[1].   Really NiceGsm  Global System For Mobile Comm[1].   Really Nice
Gsm Global System For Mobile Comm[1]. Really Nice
 
TDMA, FDMA, CDMA
TDMA, FDMA, CDMATDMA, FDMA, CDMA
TDMA, FDMA, CDMA
 
Introduction to ofdm
Introduction to ofdmIntroduction to ofdm
Introduction to ofdm
 
Time Division Multiplexing
Time Division MultiplexingTime Division Multiplexing
Time Division Multiplexing
 
Analysis of 1G, 2G, 3G & 4G
Analysis of 1G, 2G, 3G & 4GAnalysis of 1G, 2G, 3G & 4G
Analysis of 1G, 2G, 3G & 4G
 
gsm based Voting system
gsm based Voting system gsm based Voting system
gsm based Voting system
 
Tài liệu gsm bts 3900
Tài liệu gsm bts 3900Tài liệu gsm bts 3900
Tài liệu gsm bts 3900
 
Pulse Code Modulation (PCM)
Pulse Code Modulation (PCM)Pulse Code Modulation (PCM)
Pulse Code Modulation (PCM)
 
Gsm signalling protocol
Gsm signalling protocolGsm signalling protocol
Gsm signalling protocol
 
HDTV
HDTVHDTV
HDTV
 
Intorduction to cellular communication
Intorduction to cellular communicationIntorduction to cellular communication
Intorduction to cellular communication
 
LTE Advance Pro
LTE Advance ProLTE Advance Pro
LTE Advance Pro
 
Gsm fundamentals
Gsm fundamentalsGsm fundamentals
Gsm fundamentals
 

Similar to Sql tutorial for select, where, order by, null, insert functions

ADV Powepoint 2 Lec.pptx
ADV Powepoint 2 Lec.pptxADV Powepoint 2 Lec.pptx
ADV Powepoint 2 Lec.pptx
ArjayBalberan1
 
Complete Sql Server querries
Complete Sql Server querriesComplete Sql Server querries
Complete Sql Server querries
Ibrahim Jutt
 
SQL Assessment Command Statements
SQL Assessment Command StatementsSQL Assessment Command Statements
SQL Assessment Command Statements
Shaun Wilson
 
SQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdfSQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdf
AnishurRehman1
 
SQL
SQLSQL
2.2 sql commands
2.2 sql commands2.2 sql commands
Data Base Management System Lecture 10.pdf
Data Base Management System Lecture 10.pdfData Base Management System Lecture 10.pdf
Data Base Management System Lecture 10.pdf
howto4ucontact
 
Sql practise for beginners
Sql practise for beginnersSql practise for beginners
Sql practise for beginners
ISsoft
 
Introduction to structured query language
Introduction to structured query languageIntroduction to structured query language
Introduction to structured query language
Huda Alameen
 
Tk2323 lecture 7 sql
Tk2323 lecture 7   sql Tk2323 lecture 7   sql
Tk2323 lecture 7 sql
MengChun Lam
 
Sql
SqlSql

Similar to Sql tutorial for select, where, order by, null, insert functions (11)

ADV Powepoint 2 Lec.pptx
ADV Powepoint 2 Lec.pptxADV Powepoint 2 Lec.pptx
ADV Powepoint 2 Lec.pptx
 
Complete Sql Server querries
Complete Sql Server querriesComplete Sql Server querries
Complete Sql Server querries
 
SQL Assessment Command Statements
SQL Assessment Command StatementsSQL Assessment Command Statements
SQL Assessment Command Statements
 
SQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdfSQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdf
 
SQL
SQLSQL
SQL
 
2.2 sql commands
2.2 sql commands2.2 sql commands
2.2 sql commands
 
Data Base Management System Lecture 10.pdf
Data Base Management System Lecture 10.pdfData Base Management System Lecture 10.pdf
Data Base Management System Lecture 10.pdf
 
Sql practise for beginners
Sql practise for beginnersSql practise for beginners
Sql practise for beginners
 
Introduction to structured query language
Introduction to structured query languageIntroduction to structured query language
Introduction to structured query language
 
Tk2323 lecture 7 sql
Tk2323 lecture 7   sql Tk2323 lecture 7   sql
Tk2323 lecture 7 sql
 
Sql
SqlSql
Sql
 

More from Avjinder (Avi) Kaler

Unleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder KalerUnleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Avjinder (Avi) Kaler
 
Tutorial for Deep Learning Project with Keras
Tutorial for Deep Learning Project  with KerasTutorial for Deep Learning Project  with Keras
Tutorial for Deep Learning Project with Keras
Avjinder (Avi) Kaler
 
Tutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine LearningTutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine Learning
Avjinder (Avi) Kaler
 
Python Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdfPython Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdf
Avjinder (Avi) Kaler
 
Kaler et al 2018 euphytica
Kaler et al 2018 euphyticaKaler et al 2018 euphytica
Kaler et al 2018 euphytica
Avjinder (Avi) Kaler
 
Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...
Avjinder (Avi) Kaler
 
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Avjinder (Avi) Kaler
 
Genome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypesGenome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypes
Avjinder (Avi) Kaler
 
Tutorial for Estimating Broad and Narrow Sense Heritability using R
Tutorial for Estimating Broad and Narrow Sense Heritability using RTutorial for Estimating Broad and Narrow Sense Heritability using R
Tutorial for Estimating Broad and Narrow Sense Heritability using R
Avjinder (Avi) Kaler
 
Tutorial for Circular and Rectangular Manhattan plots
Tutorial for Circular and Rectangular Manhattan plotsTutorial for Circular and Rectangular Manhattan plots
Tutorial for Circular and Rectangular Manhattan plots
Avjinder (Avi) Kaler
 
Genomic Selection with Bayesian Generalized Linear Regression model using R
Genomic Selection with Bayesian Generalized Linear Regression model using RGenomic Selection with Bayesian Generalized Linear Regression model using R
Genomic Selection with Bayesian Generalized Linear Regression model using R
Avjinder (Avi) Kaler
 
Genome wide association mapping
Genome wide association mappingGenome wide association mapping
Genome wide association mapping
Avjinder (Avi) Kaler
 
Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...
Avjinder (Avi) Kaler
 
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Avjinder (Avi) Kaler
 
R code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder KalerR code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder Kaler
Avjinder (Avi) Kaler
 
Population genetics
Population geneticsPopulation genetics
Population genetics
Avjinder (Avi) Kaler
 
Quantitative genetics
Quantitative geneticsQuantitative genetics
Quantitative genetics
Avjinder (Avi) Kaler
 
Abiotic stresses in plant
Abiotic stresses in plantAbiotic stresses in plant
Abiotic stresses in plant
Avjinder (Avi) Kaler
 
Seed rate calculation for experiment
Seed rate calculation for experimentSeed rate calculation for experiment
Seed rate calculation for experiment
Avjinder (Avi) Kaler
 
R Code for EM Algorithm
R Code for EM AlgorithmR Code for EM Algorithm
R Code for EM Algorithm
Avjinder (Avi) Kaler
 

More from Avjinder (Avi) Kaler (20)

Unleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder KalerUnleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
Unleashing Real-World Simulations: A Python Tutorial by Avjinder Kaler
 
Tutorial for Deep Learning Project with Keras
Tutorial for Deep Learning Project  with KerasTutorial for Deep Learning Project  with Keras
Tutorial for Deep Learning Project with Keras
 
Tutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine LearningTutorial for DBSCAN Clustering in Machine Learning
Tutorial for DBSCAN Clustering in Machine Learning
 
Python Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdfPython Code for Classification Supervised Machine Learning.pdf
Python Code for Classification Supervised Machine Learning.pdf
 
Kaler et al 2018 euphytica
Kaler et al 2018 euphyticaKaler et al 2018 euphytica
Kaler et al 2018 euphytica
 
Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...Association mapping identifies loci for canopy coverage in diverse soybean ge...
Association mapping identifies loci for canopy coverage in diverse soybean ge...
 
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
Genome-Wide Association Mapping of Carbon Isotope and Oxygen Isotope Ratios i...
 
Genome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypesGenome-wide association mapping of canopy wilting in diverse soybean genotypes
Genome-wide association mapping of canopy wilting in diverse soybean genotypes
 
Tutorial for Estimating Broad and Narrow Sense Heritability using R
Tutorial for Estimating Broad and Narrow Sense Heritability using RTutorial for Estimating Broad and Narrow Sense Heritability using R
Tutorial for Estimating Broad and Narrow Sense Heritability using R
 
Tutorial for Circular and Rectangular Manhattan plots
Tutorial for Circular and Rectangular Manhattan plotsTutorial for Circular and Rectangular Manhattan plots
Tutorial for Circular and Rectangular Manhattan plots
 
Genomic Selection with Bayesian Generalized Linear Regression model using R
Genomic Selection with Bayesian Generalized Linear Regression model using RGenomic Selection with Bayesian Generalized Linear Regression model using R
Genomic Selection with Bayesian Generalized Linear Regression model using R
 
Genome wide association mapping
Genome wide association mappingGenome wide association mapping
Genome wide association mapping
 
Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...Nutrient availability response to sulfur amendment in histosols having variab...
Nutrient availability response to sulfur amendment in histosols having variab...
 
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
Sugarcane yield and plant nutrient response to sulfur amended everglades hist...
 
R code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder KalerR code descriptive statistics of phenotypic data by Avjinder Kaler
R code descriptive statistics of phenotypic data by Avjinder Kaler
 
Population genetics
Population geneticsPopulation genetics
Population genetics
 
Quantitative genetics
Quantitative geneticsQuantitative genetics
Quantitative genetics
 
Abiotic stresses in plant
Abiotic stresses in plantAbiotic stresses in plant
Abiotic stresses in plant
 
Seed rate calculation for experiment
Seed rate calculation for experimentSeed rate calculation for experiment
Seed rate calculation for experiment
 
R Code for EM Algorithm
R Code for EM AlgorithmR Code for EM Algorithm
R Code for EM Algorithm
 

Recently uploaded

Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
National Information Standards Organization (NISO)
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
blueshagoo1
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 

Recently uploaded (20)

Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"Benner "Expanding Pathways to Publishing Careers"
Benner "Expanding Pathways to Publishing Careers"
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
CIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdfCIS 4200-02 Group 1 Final Project Report (1).pdf
CIS 4200-02 Group 1 Final Project Report (1).pdf
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 

Sql tutorial for select, where, order by, null, insert functions

  • 1. SQL Tutorial to use SELECT, WHERE, Order by, INSERT, NULL Functions By Avjinder Kaler (askaler@uark.edu) SQL is a standard language for storing, manipulating and retrieving data in databases.
  • 2. SELECT function for selection purpose in the Table. • When someone want to select all the columns from the Customers table. SELECT * FROM Customers; * for all columns • When you want to select only one column, for example the City column, from the Customers table. SELECT City FROM Customers; • When you want to select different values from the Country column in the Customers table. SELECT DISTINCT Country FROM Customers;
  • 3. Where function for selection purpose at specific place in the Table. • When you want to select a specific value in a specific column, for example the "Berlin" value from the City column in the Customers table. SELECT * FROM Customers WHERE City = 'Berlin'; • When you want to select all values other than one specific value in a specific column, for example the "Not Berlin" value from the City column in the Customers table. SELECT * FROM Customers WHERE City <> 'Berlin'; * These are different operator to use.
  • 4. • When you want to select one specific number value in a specific column, for example the "32" value from the CustomerID column in the Customers table. SELECT * FROM Customers WHERE CustomerID = 32; • When you want to select records from two columns, for example Berlin value from City column and the value 12209 from PostalCode column in the Customers table. SELECT* FROM Customers WHERE City = 'Berlin' AND PostalCode = 12209; • When you want to select two different records from the same column, for example the value Berlin and the value London from the City column in the Customers table. SELECT * FROM Customers WHERE City = 'Berlin' OR City = 'London';
  • 5. Order by function for sorting the records in the columns in the Table. • When you want to sort the records alphabetically in a specific column, for example records in the City column in the Customers table. SELECT * FROM Customers ORDER BY City; • When you want to sort the records reverse alphabetically in a specific column, for example records in the City column in the Customers table. SELECT * FROM Customers ORDER BY City DESC; • When you want to sort the records in two columns, first one column and then second after that, for example first by the column Country, then, by the column City in the Customers table. SELECT * FROM Customers ORDER BY Country, City;
  • 6. Insert function for inserting new records in the columns in the Table. • When you want to insert new values the records in different columns, for example 'Hekkan Burger', ‘Gateveien 15', 'Sandnes', '4306', 'Norway' new values in the CustomerName, Address, City, PostalCode, Country columns, respectively, in the Customers table. INSERT INTO Customers ( CustomerName, Address, City, Columns where new records will be inserted PostalCode, Country) VALUES ( 'Hekkan Burger', 'Gateveien 15', 'Sandnes', new records/values '4306', 'Norway');
  • 7. Null function for inserting new records in the columns in the Table. • When you want to select all empty records from a specific column, for example empty records in the PostalCode column in the Customers table. SELECT * FROM Customers WHERE PostalCode IS NULL; • When you want to select all non-empty records from a specific column, for example non-empty records in the PostalCode column in the Customers table. SELECT * FROM Customers WHERE PostalCode IS NOT NULL;