

Databases
Presentation
•
Computers
•
10th Grade
•
Practice Problem
•
Medium
Robert B.A
Used 1+ times
FREE Resource
7 Slides • 22 Questions
1
SQL
2
Introduction
Structured Query Language (SQL) is the standard query language for writing scripts to obtain useful information from a database.
SQL performs actions such as defining tables, changing tables, add data to tables, search data from the table, perform calculations.
3
SQL scripts
An SQL script is a list of SQL commands that perform a given task, often stored in a file so the script can be reused.
4
SELECT .... FROM
SELECT: Fetches specified fields (columns) from a table; queries
always begin with SELECT.
FROM: Identifies the table to use.
SELECT * – this specifies that all fields (columns) are to be shown.
SELECT ColumnName
FROM TableName
5
SQL Examples
Display the first name of all students
Display the first name and last name of all students
Display all columns in the table
6
SELECT .. FROM ... WHERE
This retreives only specific data.
logical operators for single condition.
= (Equal to)
< (Less than)
> (Greater than)
<= (Less or equal to)
>= (Greater or equal to)
<> (Not equal to)
7
Multiple Conditions
Operators used for multiple conditions
AND. (Returns data that meets both conditions)
OR. (Returns data that meets one condition or both)
8
Fill in the Blanks
9
Multiple Choice
What does the SELECT statement in SQL do?
10
Multiple Choice
Which SQL keyword is used to select all columns from a table?
11
Multiple Choice
How would you retrieve the "FirstName" and "LastName" columns from the "Employees" table?
12
Multiple Choice
Which clause is used to filter the results of a SELECT statement?
13
Multiple Choice
What does the following SQL query do?
SELECT ProductName, Price FROM Products WHERE Price > 100;
14
Multiple Choice
Which SQL statement correctly retrieves all columns from the "Students" table where the "Grade" is greater than 85?
15
Multiple Choice
How would you write a query to retrieve the "FirstName" and "LastName" of employees from the "Employees" table who are in the "Sales" department?
16
Multiple Choice
How would you retrieve all products from the "Products" table that have a price less than $50?
17
Multiple Choice
Which of the following queries retrieves employees from the "Employees" table who are not in the "IT" department?
18
Multiple Choice
How would you write a query to select the "CustomerName" and "City" from the "Customers" table for customers who live in "New York"?
19
Multiple Choice
Which SQL statement is used to retrieve all columns from the "Transactions" table where the "TransactionType" is 'Credit'?
20
Multiple Choice
What will the following SQL query return?
SELECT FirstName, LastName FROM Employees WHERE Salary > 50000;
21
Multiple Choice
Which data type would be most appropriate for storing a student’s date of birth in a school database?
Date
Text
22
Multiple Choice
A database stores the percentage of students who passed an exam. Which data type should be used for this percentage?
Integer
Float/Real
Text
Boolean
23
Multiple Choice
The Is_Enrolled field in a student database, which indicates whether a student is currently enrolled, should use which data type?
24
Multiple Choice
Which data type would be best for storing a student’s grade level (e.g., 7, 8, 9) in a school database?
25
Multiple Choice
In a school database, the Email field should be stored as which data type?
26
Multiple Choice
The GPA (Grade Point Average) field in a student database, which may have decimal places, should be stored as which data type?
27
Multiple Choice
If you were to store a list of extracurricular activities a student is involved in, which data type would be most suitable?
text
28
Multiple Choice
Which data type would you use to store a student's contact number in a school database?
29
Match
Match the following
Account_Number
Account_Holder_Name
Account_Balance
Date_Of_Opening
Is_Active
INTEGER
String/Text
Real
Date
Boolean
INTEGER
String/Text
Real
Date
Boolean
SQL
Show answer
Auto Play
Slide 1 / 29
SLIDE
Similar Resources on Wayground
21 questions
Cumulative Frequency
Presentation
•
10th Grade
20 questions
Boyle's Law and Charles' Law
Presentation
•
10th Grade
20 questions
One Step Equations
Presentation
•
KG - University
20 questions
1.1.2 Cell Transport
Presentation
•
10th Grade
24 questions
IGCSE ICT 6.4 Microprocessors
Presentation
•
10th Grade
23 questions
Naming Covalent Compounds
Presentation
•
10th Grade
21 questions
Incas
Presentation
•
10th Grade
21 questions
Congruence Theorems
Presentation
•
10th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade