1. What does SQL stand for?
Structured Question Language
Structured Query Language
Strong Question Language
2. Which SQL statement is used to extract data from a database?
GET
EXTRACT
SELECT
OPEN
3. Which SQL statement is used to update data in a database?
MODIFY
SAVE AS
UPDATE
SAVE
4. Which SQL statement is used to delete data from a database?
REMOVE
COLLAPSE
DELETE
5. Which SQL statement is used to insert new data in a database?
ADD RECORD
INSERT NEW
ADD NEW
INSERT INTO
6. With SQL, how do you select a column named "FirstName" from a
table named "Persons"?
SELECT Persons.FirstName
EXTRACT FirstName FROM Persons
SELECT FirstName FROM Persons
7. With SQL, how do you select all the columns from a table named
"Persons"?
SELECT * FROM Persons
SELECT Persons
SELECT *.Persons
SELECT [all] FROM Persons
8. With SQL, how do you select all the records from a table named
"Persons" where the value of the column "FirstName" is "Peter"?
SELECT [all] FROM Persons WHERE FirstName='Peter'
SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'
SELECT * FROM Persons WHERE FirstName='Peter'
SELECT * FROM Persons WHERE FirstName<>'Peter'
9. With SQL, how do you select all the records from a table named
"Persons" where the value of the column "FirstName" starts with an
"a"?
SELECT * FROM Persons WHERE FirstName='%a%'
SELECT * FROM Persons WHERE FirstName LIKE 'a%'
SELECT * FROM Persons WHERE FirstName LIKE '%a'
SELECT * FROM Persons WHERE FirstName='a'
10. The OR operator displays a record if ANY conditions listed are
true. The AND operator displays a record if ALL of the conditions
listed are true
True
False
11. With SQL, how do you select all the records from a table named
"Persons" where the "FirstName" is "Peter" and the "LastName" is
"Jackson"?
SELECT * FROM Persons WHERE FirstName='Peter' AND
LastName='Jackson'
SELECT FirstName='Peter', LastName='Jackson' FROM Persons
SELECT * FROM Persons WHERE FirstName<>'Peter' AND
LastName<>'Jackson'
12. With SQL, how do you select all the records from a table named
"Persons" where the "LastName" is alphabetically between (and
including) "Hansen" and "Pettersen"?
SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen'
AND 'Pettersen'
SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM
Persons
SELECT * FROM Persons WHERE LastName>'Hansen' AND
LastName<'Pettersen'
13. Which SQL statement is used to return only different values?
SELECT UNIQUE
SELECT DISTINCT
SELECT DIFFERENT
14. Which SQL keyword is used to sort the result-set?
ORDER
SORT
ORDER BY
SORT BY
15. With SQL, how can you return all the records from a table
named "Persons" sorted descending by "FirstName"?
SELECT * FROM Persons ORDER BY FirstName DESC
SELECT * FROM Persons SORT BY 'FirstName' DESC
SELECT * FROM Persons ORDER FirstName DESC
SELECT * FROM Persons SORT 'FirstName' DESC
16. Select the statement that shows the sum of population of all
countries in 'Europe'
A. SELECT name, population FROM bbc WHERE region = 'Europe'
B. SELECT population FROM bbc WHERE region = 'Europe' SUM BY
region
C. SELECT SUM(population) FROM bbc WHERE region = 'Europe'
D. SELECT SUM(population FROM bbc WHERE region = 'Europe')
17. Select the statement that shows the number of countries with
population smaller than 150000
A. SELECT COUNT(population < 150000) FROM bbc
B. SELECT COUNT(name) FROM bbc WHERE population < 150000
C. SELECT COUNT(population) FROM bbc WHERE population <
150000
D. SELECT sum(population < 150000) FROM bbc
18. Select the result that would be obtained from the following
code:
SELECT region, SUM(area)
FROM bbc
WHERE SUM(area) > 15000000
GROUP BY region
A.
B.
C. No result due to invalid use of the GROUP BY function
D. No result due to invalid use of the WHERE function

More Related Content

PDF
PPTX
Advanced Database Systems - Presentation 4.pptx
PPTX
SQL Where Clause.pptx
PDF
SQL notes 1.pdf
PPT
MS SQL Server 1
PPT
CE 279 - WRITING SQL QUERIES umat edition.ppt
PPT
Sql – Structured Query Language
PDF
SQL_BASIC AND ADVANCED.pdf
Advanced Database Systems - Presentation 4.pptx
SQL Where Clause.pptx
SQL notes 1.pdf
MS SQL Server 1
CE 279 - WRITING SQL QUERIES umat edition.ppt
Sql – Structured Query Language
SQL_BASIC AND ADVANCED.pdf

Similar to quiz1.pdf (20)

PDF
SQL Basics and Advanced for analytics.pdf
DOCX
SQL Language
DOCX
PDF
DOC
Introduction to sql
DOC
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
PPTX
Advanced Database Systems - Presentation 3.pptx
PPTX
06.01 sql select distinct
DOCX
Sql intro
PPTX
Advanced Database Systems - Presentation 2.pptx
DOC
Learn sql queries
DOC
A must Sql notes for beginners
PPTX
Database Management - Lecture 2 - SQL select, insert, update and delete
DOCX
Bibashsql
PPTX
53 SQL Questions-Answers=53 SQL Questions-Answers
PPTX
53 SQL Questions-Answers12121212121212.pptx
DOCX
SQL commands.docx
PPT
98765432345671223Intro-to-PostgreSQL.ppt
PPTX
Lesson 6 Information Management for BSIT.pptx
DOCX
Learning sql from w3schools
SQL Basics and Advanced for analytics.pdf
SQL Language
Introduction to sql
ORACLE PL/SQL TUTORIALS - OVERVIEW - SQL COMMANDS
Advanced Database Systems - Presentation 3.pptx
06.01 sql select distinct
Sql intro
Advanced Database Systems - Presentation 2.pptx
Learn sql queries
A must Sql notes for beginners
Database Management - Lecture 2 - SQL select, insert, update and delete
Bibashsql
53 SQL Questions-Answers=53 SQL Questions-Answers
53 SQL Questions-Answers12121212121212.pptx
SQL commands.docx
98765432345671223Intro-to-PostgreSQL.ppt
Lesson 6 Information Management for BSIT.pptx
Learning sql from w3schools
Ad

Recently uploaded (20)

PDF
4 layer Arch & Reference Arch of IoT.pdf
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
4 layer Arch & Reference Arch of IoT.pdf
Training Program for knowledge in solar cell and solar industry
Rapid Prototyping: A lecture on prototyping techniques for interface design
Comparative analysis of machine learning models for fake news detection in so...
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
The influence of sentiment analysis in enhancing early warning system model f...
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
giants, standing on the shoulders of - by Daniel Stenberg
NewMind AI Weekly Chronicles – August ’25 Week IV
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Taming the Chaos: How to Turn Unstructured Data into Decisions
Module 1 Introduction to Web Programming .pptx
Consumable AI The What, Why & How for Small Teams.pdf
Data Virtualization in Action: Scaling APIs and Apps with FME
Lung cancer patients survival prediction using outlier detection and optimize...
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
MuleSoft-Compete-Deck for midddleware integrations
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
Enhancing plagiarism detection using data pre-processing and machine learning...
Ad

quiz1.pdf

  • 1. 1. What does SQL stand for? Structured Question Language Structured Query Language Strong Question Language 2. Which SQL statement is used to extract data from a database? GET EXTRACT SELECT OPEN 3. Which SQL statement is used to update data in a database? MODIFY SAVE AS UPDATE SAVE 4. Which SQL statement is used to delete data from a database? REMOVE COLLAPSE DELETE
  • 2. 5. Which SQL statement is used to insert new data in a database? ADD RECORD INSERT NEW ADD NEW INSERT INTO 6. With SQL, how do you select a column named "FirstName" from a table named "Persons"? SELECT Persons.FirstName EXTRACT FirstName FROM Persons SELECT FirstName FROM Persons 7. With SQL, how do you select all the columns from a table named "Persons"? SELECT * FROM Persons SELECT Persons SELECT *.Persons SELECT [all] FROM Persons 8. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"? SELECT [all] FROM Persons WHERE FirstName='Peter' SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter' SELECT * FROM Persons WHERE FirstName='Peter'
  • 3. SELECT * FROM Persons WHERE FirstName<>'Peter' 9. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"? SELECT * FROM Persons WHERE FirstName='%a%' SELECT * FROM Persons WHERE FirstName LIKE 'a%' SELECT * FROM Persons WHERE FirstName LIKE '%a' SELECT * FROM Persons WHERE FirstName='a' 10. The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true True False 11. With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"? SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson' SELECT FirstName='Peter', LastName='Jackson' FROM Persons SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson' 12. With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?
  • 4. SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen' SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen' 13. Which SQL statement is used to return only different values? SELECT UNIQUE SELECT DISTINCT SELECT DIFFERENT 14. Which SQL keyword is used to sort the result-set? ORDER SORT ORDER BY SORT BY 15. With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"? SELECT * FROM Persons ORDER BY FirstName DESC SELECT * FROM Persons SORT BY 'FirstName' DESC SELECT * FROM Persons ORDER FirstName DESC SELECT * FROM Persons SORT 'FirstName' DESC
  • 5. 16. Select the statement that shows the sum of population of all countries in 'Europe' A. SELECT name, population FROM bbc WHERE region = 'Europe' B. SELECT population FROM bbc WHERE region = 'Europe' SUM BY region C. SELECT SUM(population) FROM bbc WHERE region = 'Europe' D. SELECT SUM(population FROM bbc WHERE region = 'Europe') 17. Select the statement that shows the number of countries with population smaller than 150000 A. SELECT COUNT(population < 150000) FROM bbc B. SELECT COUNT(name) FROM bbc WHERE population < 150000 C. SELECT COUNT(population) FROM bbc WHERE population < 150000 D. SELECT sum(population < 150000) FROM bbc 18. Select the result that would be obtained from the following code: SELECT region, SUM(area) FROM bbc WHERE SUM(area) > 15000000 GROUP BY region
  • 6. A. B. C. No result due to invalid use of the GROUP BY function D. No result due to invalid use of the WHERE function