SlideShare a Scribd company logo
1 of 10
Introduction to SQL
1
Introduction to SQL
 SQL (pronounced "ess-que-el") stands for
Structured Query Language.
 SQL is used to communicate with a database.
According to ANSI (American National Standards
Institute), it is the standard language for relational
database management systems. SQL statements
are used to perform tasks such as update data on a
database, or retrieve data from a database
2
Introduction to SQL(CONT)
 However, the standard SQL commands such
as "Select", "Insert", "Update", "Delete",
"Create",
Query
 A query is an inquiry to the database for
information. A query is usually issued to the
database through an application interface or
via a command line prompt.
3
Types of SQL Commands
 The main categories are
 DDL (Data Definition Language)
 DML (Data Manipulation Language)
 DQL (Data Query Language)
 DCL (Data Control Language)
 Data administration commands
 Transactional control commands
4
Defining Database Structures
 Data Definition Language, DDL,
 Subset of sql statements.
 is the part of SQL that allows a database user to create and
restructure database objects, such as the creation or the
deletion of a table.
 Some of the most fundamental DDL commands discussed
during following hours include the following:
 CREATE TABLE
 ALTER TABLE (for add or drop cloumn’s in table )
 Change the datatype of cloumn’s
 DROP TABLE
5
Manipulating Data
 Data Manipulation Language, DML, is the part
of SQL used to manipulate data within objects of
a relational database.
 Sometime It is also called read only quary.
 There are three basic DML commands:
 SELECT
 INSERT
 UPDATE
 DELETE
6
Create Query
 Syntax
Create DATABASE database_name
Now we want to create database called
“mydb”. We use the following CREATE
DATABASE statement:
CREATE DATABASE my_db
7
Selecting Data
 Though comprised of only one command, Data
Query Language (DQL) is the most concentrated
focus of SQL for modern relational database
users. The base command is as follows:
 SELECT
 This command, accompanied by many options
and clauses, is used to compose queries against a
relational database. Queries, from simple to
complex, from vague to specific, can be easily
created.
8
Data Control Language
 Data control commands in SQL allow you to control
access to data within the database.
 These DCL commands are normally used to create
objects related to user access and also control the
distribution of privileges among users.
 Some data control commands are as follows:
 GRANT
 REVOKE
9
Data Control Language
 Data control commands in SQL allow you to control
access to data within the database.
 These DCL commands are normally used to create
objects related to user access and also control the
distribution of privileges among users.
 Some data control commands are as follows:
 GRANT
 REVOKE
9

More Related Content

What's hot (20)

Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
Sql - Structured Query Language
Sql - Structured Query LanguageSql - Structured Query Language
Sql - Structured Query Language
 
Sql commands
Sql commandsSql commands
Sql commands
 
Basic SQL and History
 Basic SQL and History Basic SQL and History
Basic SQL and History
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
Structured Query Language (SQL)
Structured Query Language (SQL)Structured Query Language (SQL)
Structured Query Language (SQL)
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Database
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Language
 
Sql commands
Sql commandsSql commands
Sql commands
 
Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
Oracle RDBMS architecture
Oracle RDBMS architectureOracle RDBMS architecture
Oracle RDBMS architecture
 
PostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | EdurekaPostgreSQL Tutorial For Beginners | Edureka
PostgreSQL Tutorial For Beginners | Edureka
 
SQL commands
SQL commandsSQL commands
SQL commands
 
SQL
SQLSQL
SQL
 

Similar to Introduction to SQL

Types of sql commands by naveen kumar veligeti
Types of sql commands by naveen kumar veligetiTypes of sql commands by naveen kumar veligeti
Types of sql commands by naveen kumar veligetiNaveen Kumar Veligeti
 
SQL Injection Attacks
SQL Injection AttacksSQL Injection Attacks
SQL Injection AttacksHTS Hosting
 
Introduction to SQL.pptx
Introduction to SQL.pptxIntroduction to SQL.pptx
Introduction to SQL.pptxshubhidas
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08Hassen Poreya
 
SQL Training Institute in Ambala ! Batra Computer Centre
SQL Training Institute in Ambala ! Batra Computer CentreSQL Training Institute in Ambala ! Batra Computer Centre
SQL Training Institute in Ambala ! Batra Computer Centrejatin batra
 
Review of theory of database
Review of theory of databaseReview of theory of database
Review of theory of databaseAnne Lee
 
An intoduction to sql and its components
An intoduction to sql and its componentsAn intoduction to sql and its components
An intoduction to sql and its componentsMonika Jain DAIMSR
 
Structured query language
Structured query languageStructured query language
Structured query languageRashid Ansari
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Vidyasagar Mundroy
 
Introduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQLIntroduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQLHarmony Kwawu
 

Similar to Introduction to SQL (20)

Types of sql commands by naveen kumar veligeti
Types of sql commands by naveen kumar veligetiTypes of sql commands by naveen kumar veligeti
Types of sql commands by naveen kumar veligeti
 
SQL Injection Attacks
SQL Injection AttacksSQL Injection Attacks
SQL Injection Attacks
 
Introduction to SQL.pptx
Introduction to SQL.pptxIntroduction to SQL.pptx
Introduction to SQL.pptx
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08
 
Oracle SQL Part1
Oracle SQL Part1Oracle SQL Part1
Oracle SQL Part1
 
Sql commands
Sql commandsSql commands
Sql commands
 
SQL Training Institute in Ambala ! Batra Computer Centre
SQL Training Institute in Ambala ! Batra Computer CentreSQL Training Institute in Ambala ! Batra Computer Centre
SQL Training Institute in Ambala ! Batra Computer Centre
 
Review of theory of database
Review of theory of databaseReview of theory of database
Review of theory of database
 
An intoduction to sql and its components
An intoduction to sql and its componentsAn intoduction to sql and its components
An intoduction to sql and its components
 
Database Languages.pptx
Database Languages.pptxDatabase Languages.pptx
Database Languages.pptx
 
SQL2.pptx
SQL2.pptxSQL2.pptx
SQL2.pptx
 
Sqlite
SqliteSqlite
Sqlite
 
Structured query language
Structured query languageStructured query language
Structured query language
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)
 
Introduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQLIntroduction to the Structured Query Language SQL
Introduction to the Structured Query Language SQL
 
Ddl vs dml
Ddl vs dmlDdl vs dml
Ddl vs dml
 
SQLGuide.ppt.pptx
SQLGuide.ppt.pptxSQLGuide.ppt.pptx
SQLGuide.ppt.pptx
 
SQLGuide.ppt.pptx
SQLGuide.ppt.pptxSQLGuide.ppt.pptx
SQLGuide.ppt.pptx
 
Data base
Data baseData base
Data base
 
SQL
SQLSQL
SQL
 

More from Tayyab Hussain

More from Tayyab Hussain (10)

Networking devices
Networking devicesNetworking devices
Networking devices
 
Ipv6 presention
Ipv6 presentionIpv6 presention
Ipv6 presention
 
Deadlock in database
Deadlock in databaseDeadlock in database
Deadlock in database
 
Input devices presentation
Input devices presentationInput devices presentation
Input devices presentation
 
Self discipline
Self disciplineSelf discipline
Self discipline
 
Prejudice and stereotyping
Prejudice and stereotypingPrejudice and stereotyping
Prejudice and stereotyping
 
Newtons law of motion
Newtons law of motionNewtons law of motion
Newtons law of motion
 
Generations of computers
Generations of computersGenerations of computers
Generations of computers
 
Topology
TopologyTopology
Topology
 
Ipv6 presention
Ipv6 presentionIpv6 presention
Ipv6 presention
 

Recently uploaded

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Introduction to SQL

  • 2. Introduction to SQL  SQL (pronounced "ess-que-el") stands for Structured Query Language.  SQL is used to communicate with a database. According to ANSI (American National Standards Institute), it is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database 2
  • 3. Introduction to SQL(CONT)  However, the standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", Query  A query is an inquiry to the database for information. A query is usually issued to the database through an application interface or via a command line prompt. 3
  • 4. Types of SQL Commands  The main categories are  DDL (Data Definition Language)  DML (Data Manipulation Language)  DQL (Data Query Language)  DCL (Data Control Language)  Data administration commands  Transactional control commands 4
  • 5. Defining Database Structures  Data Definition Language, DDL,  Subset of sql statements.  is the part of SQL that allows a database user to create and restructure database objects, such as the creation or the deletion of a table.  Some of the most fundamental DDL commands discussed during following hours include the following:  CREATE TABLE  ALTER TABLE (for add or drop cloumn’s in table )  Change the datatype of cloumn’s  DROP TABLE 5
  • 6. Manipulating Data  Data Manipulation Language, DML, is the part of SQL used to manipulate data within objects of a relational database.  Sometime It is also called read only quary.  There are three basic DML commands:  SELECT  INSERT  UPDATE  DELETE 6
  • 7. Create Query  Syntax Create DATABASE database_name Now we want to create database called “mydb”. We use the following CREATE DATABASE statement: CREATE DATABASE my_db 7
  • 8. Selecting Data  Though comprised of only one command, Data Query Language (DQL) is the most concentrated focus of SQL for modern relational database users. The base command is as follows:  SELECT  This command, accompanied by many options and clauses, is used to compose queries against a relational database. Queries, from simple to complex, from vague to specific, can be easily created. 8
  • 9. Data Control Language  Data control commands in SQL allow you to control access to data within the database.  These DCL commands are normally used to create objects related to user access and also control the distribution of privileges among users.  Some data control commands are as follows:  GRANT  REVOKE 9
  • 10. Data Control Language  Data control commands in SQL allow you to control access to data within the database.  These DCL commands are normally used to create objects related to user access and also control the distribution of privileges among users.  Some data control commands are as follows:  GRANT  REVOKE 9