SlideShare a Scribd company logo
4
Most read
5
Most read
8
Most read
Introduction to SQL
Ram Kedem
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Objectives
• Defining SQL
• Why do we need to use it ?
• Pronouncing SQL: S-Q-L or Sequel?
• Standard SQL and language adjustments
• Types of SQL Statements
• Basic column data types in MSSQL
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Defining SQL
• Structured Query Language
• Allows users to communicate with Relational Databases and
retrieve data from their tables.
SQL
RDBMS
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Pronouncing : S-Q-L or Sequel?
• SQL was developed at IBM and it was initially called
“Structured English Query Language” (SEQUEL) and
pronounced “sequel”
• Later it was shortened to SQL - “Structured Query Language”
• Both pronunciations are correct
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Standard SQL and
Language Extensions
• The RDBMS model was implemented by many vendors –
• Microsoft (SQL Server), Oracle, IBM (DB2), MySQL, Postgres, etc.
• SQL is the language each of those vendors use in order to
access and manipulate their databases
• In most cases all vendors use the same SQL command in order
to achieve the same goal. In some cases vendors will use
specific SQL extention that will only work under their
platform.
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Standard SQL and
Language Extensions
• Same statement to retrieve data of one column
• SELECT lastName FROM employees
• Different statement to concatencate strings
• SELECT 'hello' + 'world' (SQL Server)
• SELECT 'hello' || 'world' (Oracle)
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Types of SQL Statements
• Data Manipulation Language (DML) statements are used for
managing data within schema objects. For example :
• SELECT - retrieve data from the a database
• INSERT - insert data into a table
• UPDATE - updates existing data within a table
• DELETE – delete existing rows
• Data Definition Language (DDL) statements are used to define the
database structure or schema. For example :
• CREATE - to create objects in the database
• DROP - delete objects from the database
• Data Control Language (DCL) statements. For example :
• GRANT - gives user's access privileges to database
• REVOKE - withdraw access privileges given with the GRANT
command
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Basic column data types
• Numeric columns
• INT - Integer (whole number) data value
• Money - Numeric data types with fixed precision and scale
Product id
(int)
Product price
(numeric)
Product name
(varchar(25))
Experation
(date)
1 53.3 Product1 2014/03/22
2 23.1 Product2 2014/02/21
3 32.3 Product3 2014/03/02
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Basic column data types
• Numeric columns
• INT - Integer (whole number) data value
• Money - Monetary or currency values String columns
• VARCHAR(N) – String data
• Date columns
• DATE – date data
Product id
(int)
Product price
(money)
Product name
(varchar(25))
Experation
(date)
1 53.3 Product1 2014/03/22
2 23.1 Product2 2014/02/21
3 32.3 Product3 2014/03/02
Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent
Essential Points
• SQL is the language we use in order to communicate with the
RDBMS
• Although in most cases vendors use the same SQL command,
in some cases the SQL command might be different
• There are different categories to the SQL language, and each is
responsible on different aspect
• There are many different available data types is MSSQL Server,
most basic columns are Int, Money, Varchar and Date.

More Related Content

What's hot (20)

PDF
Introduction to Databases
Ram Kedem
 
PPTX
SQL Basics
Hammad Rasheed
 
PPTX
Sql(structured query language)
Ishucs
 
PPT
Sql ppt
Anuja Lad
 
PPTX
Data base management system
ashirafzal1
 
PPTX
introduction to NOSQL Database
nehabsairam
 
PPT
OODM-object oriented data model
AnilPokhrel7
 
PDF
SQL Overview
Stewart Rogers
 
PPTX
Dbms Introduction and Basics
SHIKHA GAUTAM
 
PPTX
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
PDF
NoSQL databases
Marin Dimitrov
 
PPT
SQL Tutorial - Basic Commands
1keydata
 
KEY
Lecture 07 - Basic SQL
University of Massachusetts Amherst
 
PPTX
Basic SQL and History
SomeshwarMoholkar
 
PDF
Introduction to Database
Syed Zaid Irshad
 
PPT
Normalization
ochesing
 
DOC
SQL
Shunya Ram
 
PPTX
Sql commands
Pooja Dixit
 
PDF
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
 
Introduction to Databases
Ram Kedem
 
SQL Basics
Hammad Rasheed
 
Sql(structured query language)
Ishucs
 
Sql ppt
Anuja Lad
 
Data base management system
ashirafzal1
 
introduction to NOSQL Database
nehabsairam
 
OODM-object oriented data model
AnilPokhrel7
 
SQL Overview
Stewart Rogers
 
Dbms Introduction and Basics
SHIKHA GAUTAM
 
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
NoSQL databases
Marin Dimitrov
 
SQL Tutorial - Basic Commands
1keydata
 
Lecture 07 - Basic SQL
University of Massachusetts Amherst
 
Basic SQL and History
SomeshwarMoholkar
 
Introduction to Database
Syed Zaid Irshad
 
Normalization
ochesing
 
Sql commands
Pooja Dixit
 
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
 

Similar to Introduction to SQL (20)

PPT
MySQL intro
David Rajah Selvaraj
 
PPT
MySQL intro
David Rajah Selvaraj
 
PDF
Database Systems - Introduction to SQL (Chapter 3/1)
Vidyasagar Mundroy
 
PPTX
shs tvl ict_Programming Introduction to SQl.pptx
Joseph Camarote
 
PPTX
slides about : Introduction_to_SQL.pptx
DrMarwaElsherif
 
PDF
Structures query language ___PPT (1).pdf
tipurple7989
 
PPTX
Structured query language
Rashid Ansari
 
PPTX
Introduction to SQL
MLG College of Learning, Inc
 
DOC
Introduction to sql
SARVESH KUMAR
 
PDF
Complete SQL in one video by shradha.pdf
rahulashu699
 
PPTX
Introduction to SQL, SQL*Plus
Chhom Karath
 
PDF
Database management system unit 1 Bca 2-semester notes
n32310997
 
PPTX
DEE 431 Introduction to Mysql Slide 3
YOGESH SINGH
 
PPTX
Unit - II.pptx
MrsSavitaKumbhare
 
PDF
SQL Intro
koppenolski
 
PPT
Introduction to SQL
Tayyab Hussain
 
PDF
Chapter – 6 SQL Lab Tutorial.pdf
TamiratDejene1
 
PDF
SQL_NOTES.pdf
AnshumanDwivedi14
 
PPTX
BITM3730Week14.pptx
MattMarino13
 
PDF
STRUCTURED QUERY LANGUAGE
SarithaDhanapal
 
Database Systems - Introduction to SQL (Chapter 3/1)
Vidyasagar Mundroy
 
shs tvl ict_Programming Introduction to SQl.pptx
Joseph Camarote
 
slides about : Introduction_to_SQL.pptx
DrMarwaElsherif
 
Structures query language ___PPT (1).pdf
tipurple7989
 
Structured query language
Rashid Ansari
 
Introduction to SQL
MLG College of Learning, Inc
 
Introduction to sql
SARVESH KUMAR
 
Complete SQL in one video by shradha.pdf
rahulashu699
 
Introduction to SQL, SQL*Plus
Chhom Karath
 
Database management system unit 1 Bca 2-semester notes
n32310997
 
DEE 431 Introduction to Mysql Slide 3
YOGESH SINGH
 
Unit - II.pptx
MrsSavitaKumbhare
 
SQL Intro
koppenolski
 
Introduction to SQL
Tayyab Hussain
 
Chapter – 6 SQL Lab Tutorial.pdf
TamiratDejene1
 
SQL_NOTES.pdf
AnshumanDwivedi14
 
BITM3730Week14.pptx
MattMarino13
 
STRUCTURED QUERY LANGUAGE
SarithaDhanapal
 
Ad

More from Ram Kedem (20)

PDF
Impala use case @ edge
Ram Kedem
 
PPTX
Advanced SQL Webinar
Ram Kedem
 
PPTX
Managing oracle Database Instance
Ram Kedem
 
PDF
Power Pivot and Power View
Ram Kedem
 
PDF
Data Mining in SSAS
Ram Kedem
 
PDF
Data mining In SSAS
Ram Kedem
 
PPTX
SQL Injections - Oracle
Ram Kedem
 
PDF
SSAS Attributes
Ram Kedem
 
PDF
SSRS Matrix
Ram Kedem
 
PDF
DDL Practice (Hebrew)
Ram Kedem
 
PDF
DML Practice (Hebrew)
Ram Kedem
 
PDF
Exploring Oracle Database Architecture (Hebrew)
Ram Kedem
 
PDF
Deploy SSRS Project - SQL Server 2014
Ram Kedem
 
PDF
Pig - Processing XML data
Ram Kedem
 
PDF
SSAS Cubes & Hierarchies
Ram Kedem
 
PDF
SSRS Basic Parameters
Ram Kedem
 
PPTX
SSRS Gauges
Ram Kedem
 
PDF
SSRS Conditional Formatting
Ram Kedem
 
PDF
SSRS Calculated Fields
Ram Kedem
 
PDF
SSRS Groups
Ram Kedem
 
Impala use case @ edge
Ram Kedem
 
Advanced SQL Webinar
Ram Kedem
 
Managing oracle Database Instance
Ram Kedem
 
Power Pivot and Power View
Ram Kedem
 
Data Mining in SSAS
Ram Kedem
 
Data mining In SSAS
Ram Kedem
 
SQL Injections - Oracle
Ram Kedem
 
SSAS Attributes
Ram Kedem
 
SSRS Matrix
Ram Kedem
 
DDL Practice (Hebrew)
Ram Kedem
 
DML Practice (Hebrew)
Ram Kedem
 
Exploring Oracle Database Architecture (Hebrew)
Ram Kedem
 
Deploy SSRS Project - SQL Server 2014
Ram Kedem
 
Pig - Processing XML data
Ram Kedem
 
SSAS Cubes & Hierarchies
Ram Kedem
 
SSRS Basic Parameters
Ram Kedem
 
SSRS Gauges
Ram Kedem
 
SSRS Conditional Formatting
Ram Kedem
 
SSRS Calculated Fields
Ram Kedem
 
SSRS Groups
Ram Kedem
 
Ad

Recently uploaded (20)

PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

Introduction to SQL

  • 2. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Objectives • Defining SQL • Why do we need to use it ? • Pronouncing SQL: S-Q-L or Sequel? • Standard SQL and language adjustments • Types of SQL Statements • Basic column data types in MSSQL
  • 3. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Defining SQL • Structured Query Language • Allows users to communicate with Relational Databases and retrieve data from their tables. SQL RDBMS
  • 4. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Pronouncing : S-Q-L or Sequel? • SQL was developed at IBM and it was initially called “Structured English Query Language” (SEQUEL) and pronounced “sequel” • Later it was shortened to SQL - “Structured Query Language” • Both pronunciations are correct
  • 5. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Standard SQL and Language Extensions • The RDBMS model was implemented by many vendors – • Microsoft (SQL Server), Oracle, IBM (DB2), MySQL, Postgres, etc. • SQL is the language each of those vendors use in order to access and manipulate their databases • In most cases all vendors use the same SQL command in order to achieve the same goal. In some cases vendors will use specific SQL extention that will only work under their platform.
  • 6. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Standard SQL and Language Extensions • Same statement to retrieve data of one column • SELECT lastName FROM employees • Different statement to concatencate strings • SELECT 'hello' + 'world' (SQL Server) • SELECT 'hello' || 'world' (Oracle)
  • 7. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Types of SQL Statements • Data Manipulation Language (DML) statements are used for managing data within schema objects. For example : • SELECT - retrieve data from the a database • INSERT - insert data into a table • UPDATE - updates existing data within a table • DELETE – delete existing rows • Data Definition Language (DDL) statements are used to define the database structure or schema. For example : • CREATE - to create objects in the database • DROP - delete objects from the database • Data Control Language (DCL) statements. For example : • GRANT - gives user's access privileges to database • REVOKE - withdraw access privileges given with the GRANT command
  • 8. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Basic column data types • Numeric columns • INT - Integer (whole number) data value • Money - Numeric data types with fixed precision and scale Product id (int) Product price (numeric) Product name (varchar(25)) Experation (date) 1 53.3 Product1 2014/03/22 2 23.1 Product2 2014/02/21 3 32.3 Product3 2014/03/02
  • 9. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Basic column data types • Numeric columns • INT - Integer (whole number) data value • Money - Monetary or currency values String columns • VARCHAR(N) – String data • Date columns • DATE – date data Product id (int) Product price (money) Product name (varchar(25)) Experation (date) 1 53.3 Product1 2014/03/22 2 23.1 Product2 2014/02/21 3 32.3 Product3 2014/03/02
  • 10. Copyright 2014 © Ram Kedem. All rights reserved. Not to be reproduced without written consent Essential Points • SQL is the language we use in order to communicate with the RDBMS • Although in most cases vendors use the same SQL command, in some cases the SQL command might be different • There are different categories to the SQL language, and each is responsible on different aspect • There are many different available data types is MSSQL Server, most basic columns are Int, Money, Varchar and Date.