SlideShare a Scribd company logo
Reviewing SQL concepts
Prof. Hitesh Mohapatra
Introduction to SQL
SQL is a standard language for storing,
manipulating and retrieving data in databases.
How to pronounce SQL properly? S-Q-L or Sequel?
According to Wikipedia:
SQL was initially developed at IBM by Donald D.
Chamberlin and Raymond F. Boyce after learning
about the relational model from Ted Codd in the
early 1970s. This version, initially called SEQUEL
(Structured English Query Language), was designed
to manipulate and retrieve data stored in IBM’s
original quasi-relational database management
system, System R, which a group at IBM San Jose
Research Laboratory had developed during the
1970s.
What is SQL?
• SQL stands for Structured Query Language
• SQL lets you access and manipulate databases
• SQL became a standard of the American
National Standards Institute (ANSI) in 1986,
and of the International Organization for
Standardization (ISO) in 1987.
What Can SQL do?
• SQL can execute queries against a database
• SQL can retrieve data from a database
• SQL can insert records in a database
• SQL can update records in a database
• SQL can delete records from a database
• SQL can create new databases
• SQL can create new tables in a database
• SQL can create stored procedures in a database
• SQL can create views in a database
• SQL can set permissions on tables, procedures, and views
SQL Syntax
A database most often contains one or more tables.
Each table is identified by a name (e.g. "Customers" or
"Orders"). Tables contain records (rows) with data.
*The table above contains five records (one for each customer) and seven columns (CustomerID, CustomerName,
ContactName, Address, City, PostalCode, and Country).
SQL Statements
Most of the actions you need to perform on a
database are done with SQL statements.
The following SQL statement selects all the
records in the "Customers" table:
SELECT * FROM Customers;
SQL keywords are NOT case sensitive: select is the same as SELECT
Semicolon after SQL Statements?
• 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
SQL SELECT Statement
The SELECT statement is used to select data
from a database.
The data returned is stored in a result table,
called the result-set.
SELECT Syntax
SELECT column1, column2, ...
FROM table_name;
Here, column1, column2, ... are the field names
of the table you want to select data from. If
you want to select all the fields available in the
table, use the following syntax:
SELECT * FROM table_name;
SELECT Column Example
The following SQL statement selects the
"CustomerName" and "City" columns from the
"Customers" table:
SELECT CustomerName, City FROM Customers;
SELECT * Example
The following SQL statement selects all the columns from the "Customers" table:
SELECT * FROM Customers;
SQL WHERE Clause
The WHERE clause is used to filter records.
The WHERE clause is used to extract only those
records that fulfill a specified condition.
WHERE Syntax
SELECT column1, column2, ...
FROM table_name
WHERE condition;
Example:
SELECT * FROM Customers
WHERE Country='Mexico';
Reviewing SQL Concepts

More Related Content

PDF
Advanced database protocols
PDF
Measures of query cost
PPTX
Sql server introduction
PPT
Earth Science Markup Language
PDF
Reviewing basic concepts of relational database
PPTX
Oracle Database | Computer Science
PPTX
Sql server basics
PPTX
Showcase Hongda
Advanced database protocols
Measures of query cost
Sql server introduction
Earth Science Markup Language
Reviewing basic concepts of relational database
Oracle Database | Computer Science
Sql server basics
Showcase Hongda

What's hot (20)

PDF
Ibm db2 interview questions and answers
PPT
php databse handling
PPTX
An Introduction To Oracle Database
PPT
Database connectivity and web technologies
PPT
Sql Server Basics
PPT
PPTX
PPT
Sql server basics
PPTX
Physical architecture of sql server
PPT
Introduction of Oracle
PPTX
RDBMS.ppt
PPT
SSIS Presentation
PPTX
Introduction to database with ms access.hetvii
PPTX
Data servers
PPTX
Exchange Database: Data loss and Recovery Methods
PPT
Object Relational Database Management System
PPTX
MS Sql Server: Introduction To Database Concepts
PPTX
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
Ibm db2 interview questions and answers
php databse handling
An Introduction To Oracle Database
Database connectivity and web technologies
Sql Server Basics
Sql server basics
Physical architecture of sql server
Introduction of Oracle
RDBMS.ppt
SSIS Presentation
Introduction to database with ms access.hetvii
Data servers
Exchange Database: Data loss and Recovery Methods
Object Relational Database Management System
MS Sql Server: Introduction To Database Concepts
DMDW 5. Student Presentation - Pentaho Data Integration (Kettle)
Ad

Similar to Reviewing SQL Concepts (20)

PPTX
shs tvl ict_Programming Introduction to SQl.pptx
PPTX
slides about : Introduction_to_SQL.pptx
PPTX
about-SQL AND ETC.pptx
PPTX
Introduction to SQL
PPTX
Structured Query Language (SQL).pptx
PPTX
SQL OVERVIEW for a new introduced student.pptx
PPTX
SQL NAD DB.pptx
PPTX
2..basic queries.pptx
PPTX
introduction to SQL query language beginner.ppt
PDF
Chapter – 6 SQL Lab Tutorial.pdf
DOCX
Book HH - SQL MATERIAL
PPTX
Lab1 select statement
PPTX
SQl data base management and design
PPTX
Sql basic things
PPTX
Unit - II.pptx
DOC
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
PPT
PDF
SQL Fundamentals - Lecture 2
PPTX
PDF
Sql cheat-sheet
shs tvl ict_Programming Introduction to SQl.pptx
slides about : Introduction_to_SQL.pptx
about-SQL AND ETC.pptx
Introduction to SQL
Structured Query Language (SQL).pptx
SQL OVERVIEW for a new introduced student.pptx
SQL NAD DB.pptx
2..basic queries.pptx
introduction to SQL query language beginner.ppt
Chapter – 6 SQL Lab Tutorial.pdf
Book HH - SQL MATERIAL
Lab1 select statement
SQl data base management and design
Sql basic things
Unit - II.pptx
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
SQL Fundamentals - Lecture 2
Sql cheat-sheet
Ad

More from Hitesh Mohapatra (20)

PDF
Introduction to Edge and Fog Computing.pdf
PDF
Amazon Web Services (AWS) : Fundamentals
PDF
Resource Cluster and Multi-Device Broker.pdf
PDF
Failover System in Cloud Computing System
PDF
Resource Replication & Automated Scaling Listener
PDF
Storage Device & Usage Monitor in Cloud Computing.pdf
PDF
Networking in Cloud Computing Environment
PDF
Uniform-Cost Search Algorithm in the AI Environment
PDF
Logical Network Perimeter in Cloud Computing
PPT
Software Product Quality - Part 1 Presentation
PDF
Multitenancy in cloud computing architecture
PDF
Server Consolidation in Cloud Computing Environment
PDF
Web Services / Technology in Cloud Computing
PDF
Resource replication in cloud computing.
PDF
Software Measurement and Metrics (Quantified Attribute)
PDF
Software project management is an art and discipline of planning and supervis...
PDF
Software project management is an art and discipline of planning and supervis...
PDF
The life cycle of a virtual machine (VM) provisioning process
PDF
BUSINESS CONSIDERATIONS FOR CLOUD COMPUTING
PDF
Traditional Data Center vs. Virtualization – Differences and Benefits
Introduction to Edge and Fog Computing.pdf
Amazon Web Services (AWS) : Fundamentals
Resource Cluster and Multi-Device Broker.pdf
Failover System in Cloud Computing System
Resource Replication & Automated Scaling Listener
Storage Device & Usage Monitor in Cloud Computing.pdf
Networking in Cloud Computing Environment
Uniform-Cost Search Algorithm in the AI Environment
Logical Network Perimeter in Cloud Computing
Software Product Quality - Part 1 Presentation
Multitenancy in cloud computing architecture
Server Consolidation in Cloud Computing Environment
Web Services / Technology in Cloud Computing
Resource replication in cloud computing.
Software Measurement and Metrics (Quantified Attribute)
Software project management is an art and discipline of planning and supervis...
Software project management is an art and discipline of planning and supervis...
The life cycle of a virtual machine (VM) provisioning process
BUSINESS CONSIDERATIONS FOR CLOUD COMPUTING
Traditional Data Center vs. Virtualization – Differences and Benefits

Recently uploaded (20)

PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
Sustainable Sites - Green Building Construction
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
PPT on Performance Review to get promotions
PPTX
Lecture Notes Electrical Wiring System Components
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Current and future trends in Computer Vision.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
web development for engineering and engineering
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Geodesy 1.pptx...............................................
Sustainable Sites - Green Building Construction
CH1 Production IntroductoryConcepts.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Foundation to blockchain - A guide to Blockchain Tech
Safety Seminar civil to be ensured for safe working.
PPT on Performance Review to get promotions
Lecture Notes Electrical Wiring System Components
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
CYBER-CRIMES AND SECURITY A guide to understanding
Current and future trends in Computer Vision.pptx
bas. eng. economics group 4 presentation 1.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
web development for engineering and engineering
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026

Reviewing SQL Concepts

  • 1. Reviewing SQL concepts Prof. Hitesh Mohapatra
  • 2. Introduction to SQL SQL is a standard language for storing, manipulating and retrieving data in databases. How to pronounce SQL properly? S-Q-L or Sequel?
  • 3. According to Wikipedia: SQL was initially developed at IBM by Donald D. Chamberlin and Raymond F. Boyce after learning about the relational model from Ted Codd in the early 1970s. This version, initially called SEQUEL (Structured English Query Language), was designed to manipulate and retrieve data stored in IBM’s original quasi-relational database management system, System R, which a group at IBM San Jose Research Laboratory had developed during the 1970s.
  • 4. What is SQL? • SQL stands for Structured Query Language • SQL lets you access and manipulate databases • SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987.
  • 5. What Can SQL do? • SQL can execute queries against a database • SQL can retrieve data from a database • SQL can insert records in a database • SQL can update records in a database • SQL can delete records from a database • SQL can create new databases • SQL can create new tables in a database • SQL can create stored procedures in a database • SQL can create views in a database • SQL can set permissions on tables, procedures, and views
  • 6. SQL Syntax A database most often contains one or more tables. Each table is identified by a name (e.g. "Customers" or "Orders"). Tables contain records (rows) with data. *The table above contains five records (one for each customer) and seven columns (CustomerID, CustomerName, ContactName, Address, City, PostalCode, and Country).
  • 7. SQL Statements Most of the actions you need to perform on a database are done with SQL statements. The following SQL statement selects all the records in the "Customers" table: SELECT * FROM Customers; SQL keywords are NOT case sensitive: select is the same as SELECT
  • 8. Semicolon after SQL Statements? • 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
  • 9. SQL SELECT Statement The SELECT statement is used to select data from a database. The data returned is stored in a result table, called the result-set. SELECT Syntax SELECT column1, column2, ... FROM table_name; Here, column1, column2, ... are the field names of the table you want to select data from. If you want to select all the fields available in the table, use the following syntax: SELECT * FROM table_name;
  • 10. SELECT Column Example The following SQL statement selects the "CustomerName" and "City" columns from the "Customers" table: SELECT CustomerName, City FROM Customers; SELECT * Example The following SQL statement selects all the columns from the "Customers" table: SELECT * FROM Customers;
  • 11. SQL WHERE Clause The WHERE clause is used to filter records. The WHERE clause is used to extract only those records that fulfill a specified condition. WHERE Syntax SELECT column1, column2, ... FROM table_name WHERE condition; Example: SELECT * FROM Customers WHERE Country='Mexico';