SlideShare a Scribd company logo
1 of 6
Quality Assurance /
Software Testing Training
SQL
Page 2Classification: Restricted
Agenda
• SQL
Page 3Classification: Restricted
SQL
SQL is a database computer language designed for the retrieval and management of data in relational database. SQL stands for
Structured Query Language.
DDL Command
Data Definition Language (DDL) is a standard for commands that define the different structures in a database. DDL
statements create, modify, and remove database objects such as tables, and users. Common DDL statements are CREATE,
ALTER, and DROP.
• CREATE - to create objects in the database
CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
column_name3 data_type(size),
);
• ALTER - alters the structure of the database
ALTER TABLE table_name
ADD column_name datatype
• DROP - delete objects from the database
DROP INDEX index_name ON table_name
• TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
TRUNCATE TABLE table_name
• COMMENT - add comments to the data dictionary
--Select all:
SELECT * FROM Customers;
• RENAME - rename an object
Alter table Stu_Table rename to Stu_Table_10
Page 4Classification: Restricted
DML Command
DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert
and update data in database. Examples: SELECT, UPDATE, INSERT statements.
• SELECT - retrieve data from the a database
SELECT * FROM table_name;)
• INSERT - insert data into a table
INSERT INTO table_name VALUES (value1,value2,value3,...);
• UPDATE - updates existing data within a table
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
• DELETE - deletes all records from a table, the space for the records remain
DELETE FROM table_name
WHERE some_column=some_value;
• MERGE - UPSERT operation (insert or update)
Page 5Classification: Restricted
DCL Command
Data Control Language (DCL) statements. Some examples:
• GRANT - gives user's access privileges to database
GRANT privilege_name
ON object_name
TO {user_name |PUBLIC |role_name}
[WITH GRANT OPTION];
• REVOKE - withdraw access privileges given with the GRANT command
REVOKE privilege_name
ON object_name
FROM {user_name |PUBLIC |role_name}
SQL Joins
An SQL JOIN clause is used to combine rows from two or more tables, based on a common field
between them.
The most common type of join is: SQL INNER JOIN (simple join). An SQL INNER JOIN returns all rows
from multiple tables where the join condition is met.
(Refer: http://www.w3schools.com/sql/sql_join.asp)
SELECT Table1.Column1_name, Table2.Columns2_Name, Table1.Column2_name
FROM Table1
INNER JOIN Table2
ON Table2.Column2_name=Table1.Column_name;
Page 6Classification: Restricted
Thank You

More Related Content

What's hot

What's hot (20)

IM02: Database Language
IM02: Database LanguageIM02: Database Language
IM02: Database Language
 
SQL: Structured Query Language
SQL: Structured Query LanguageSQL: Structured Query Language
SQL: Structured Query Language
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table
 
Sql and Sql commands
Sql and Sql commandsSql and Sql commands
Sql and Sql commands
 
8. sql
8. sql8. sql
8. sql
 
Oracle 11g SQL Overview
Oracle 11g SQL OverviewOracle 11g SQL Overview
Oracle 11g SQL Overview
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
Data manipulation language
Data manipulation languageData manipulation language
Data manipulation language
 
Introduction to mysql part 1
Introduction to mysql part 1Introduction to mysql part 1
Introduction to mysql part 1
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
PT- Oracle session01
PT- Oracle session01 PT- Oracle session01
PT- Oracle session01
 
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
 
Data Ware Housing through SQL concept
Data Ware Housing through SQL conceptData Ware Housing through SQL concept
Data Ware Housing through SQL concept
 
Group Members
Group MembersGroup Members
Group Members
 
STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGESTRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE
 
Lab2 ddl commands
Lab2 ddl commandsLab2 ddl commands
Lab2 ddl commands
 
Database Fundamental
Database FundamentalDatabase Fundamental
Database Fundamental
 
Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 
Sql – pocket guide
Sql – pocket guideSql – pocket guide
Sql – pocket guide
 

Similar to SQL

Similar to SQL (20)

Sql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.pptSql Commands_Dr.R.Shalini.ppt
Sql Commands_Dr.R.Shalini.ppt
 
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxhjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
 
Unit - II.pptx
Unit - II.pptxUnit - II.pptx
Unit - II.pptx
 
ppt.pdf
ppt.pdfppt.pdf
ppt.pdf
 
Himani uppal-221302130 WP ppt.pptx
Himani uppal-221302130  WP ppt.pptxHimani uppal-221302130  WP ppt.pptx
Himani uppal-221302130 WP ppt.pptx
 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
 
COMMANDS PPT(1).pdf
COMMANDS PPT(1).pdfCOMMANDS PPT(1).pdf
COMMANDS PPT(1).pdf
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
 
Sql
SqlSql
Sql
 
Relational Database Language.pptx
Relational Database Language.pptxRelational Database Language.pptx
Relational Database Language.pptx
 
sql.pptx
sql.pptxsql.pptx
sql.pptx
 
SQL_NOTES.pdf
SQL_NOTES.pdfSQL_NOTES.pdf
SQL_NOTES.pdf
 
SQL-SHORT-NOTES.pptx
SQL-SHORT-NOTES.pptxSQL-SHORT-NOTES.pptx
SQL-SHORT-NOTES.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
lovely
lovelylovely
lovely
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
 
Lab
LabLab
Lab
 

More from Rajesh-QA

Selenium - Installation
Selenium - InstallationSelenium - Installation
Selenium - InstallationRajesh-QA
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & TechniqueRajesh-QA
 
Tool Evaluation
Tool EvaluationTool Evaluation
Tool EvaluationRajesh-QA
 
Test Strategies and Planning
Test Strategies and PlanningTest Strategies and Planning
Test Strategies and PlanningRajesh-QA
 
Testing Concepts and Manual Testing
Testing Concepts and Manual TestingTesting Concepts and Manual Testing
Testing Concepts and Manual TestingRajesh-QA
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software TestingRajesh-QA
 
Types of Testing
Types of TestingTypes of Testing
Types of TestingRajesh-QA
 
Testing Management
Testing ManagementTesting Management
Testing ManagementRajesh-QA
 
Introduction to Software Testing Part 2
Introduction to Software Testing Part 2Introduction to Software Testing Part 2
Introduction to Software Testing Part 2Rajesh-QA
 

More from Rajesh-QA (12)

JIRA
JIRAJIRA
JIRA
 
Selenium - Installation
Selenium - InstallationSelenium - Installation
Selenium - Installation
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & Technique
 
Tool Evaluation
Tool EvaluationTool Evaluation
Tool Evaluation
 
Test Strategies and Planning
Test Strategies and PlanningTest Strategies and Planning
Test Strategies and Planning
 
SDLC
SDLCSDLC
SDLC
 
Testing Concepts and Manual Testing
Testing Concepts and Manual TestingTesting Concepts and Manual Testing
Testing Concepts and Manual Testing
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
 
Agile
AgileAgile
Agile
 
Types of Testing
Types of TestingTypes of Testing
Types of Testing
 
Testing Management
Testing ManagementTesting Management
Testing Management
 
Introduction to Software Testing Part 2
Introduction to Software Testing Part 2Introduction to Software Testing Part 2
Introduction to Software Testing Part 2
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
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 pragmaticscarlostorres15106
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
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
 
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
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

SQL

  • 1. Quality Assurance / Software Testing Training SQL
  • 3. Page 3Classification: Restricted SQL SQL is a database computer language designed for the retrieval and management of data in relational database. SQL stands for Structured Query Language. DDL Command Data Definition Language (DDL) is a standard for commands that define the different structures in a database. DDL statements create, modify, and remove database objects such as tables, and users. Common DDL statements are CREATE, ALTER, and DROP. • CREATE - to create objects in the database CREATE TABLE table_name ( column_name1 data_type(size), column_name2 data_type(size), column_name3 data_type(size), ); • ALTER - alters the structure of the database ALTER TABLE table_name ADD column_name datatype • DROP - delete objects from the database DROP INDEX index_name ON table_name • TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed TRUNCATE TABLE table_name • COMMENT - add comments to the data dictionary --Select all: SELECT * FROM Customers; • RENAME - rename an object Alter table Stu_Table rename to Stu_Table_10
  • 4. Page 4Classification: Restricted DML Command DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database. Examples: SELECT, UPDATE, INSERT statements. • SELECT - retrieve data from the a database SELECT * FROM table_name;) • INSERT - insert data into a table INSERT INTO table_name VALUES (value1,value2,value3,...); • UPDATE - updates existing data within a table UPDATE table_name SET column1=value1,column2=value2,... WHERE some_column=some_value; • DELETE - deletes all records from a table, the space for the records remain DELETE FROM table_name WHERE some_column=some_value; • MERGE - UPSERT operation (insert or update)
  • 5. Page 5Classification: Restricted DCL Command Data Control Language (DCL) statements. Some examples: • GRANT - gives user's access privileges to database GRANT privilege_name ON object_name TO {user_name |PUBLIC |role_name} [WITH GRANT OPTION]; • REVOKE - withdraw access privileges given with the GRANT command REVOKE privilege_name ON object_name FROM {user_name |PUBLIC |role_name} SQL Joins An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them. The most common type of join is: SQL INNER JOIN (simple join). An SQL INNER JOIN returns all rows from multiple tables where the join condition is met. (Refer: http://www.w3schools.com/sql/sql_join.asp) SELECT Table1.Column1_name, Table2.Columns2_Name, Table1.Column2_name FROM Table1 INNER JOIN Table2 ON Table2.Column2_name=Table1.Column_name;