SQL Query Quiz

Quiz
•
Computers
•
12th Grade
•
Easy
KAREN TAN
Used 2+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 20 pts
Write a SQL query to select all columns from a table named 'students'.
SELECT columns FROM students;
SELECT * FROM student;
SELECT * FROM table students;
SELECT * FROM students;
2.
MULTIPLE CHOICE QUESTION
1 min • 20 pts
How can you update the 'age' column in a table named 'employees' to set all values to 30?
UPDATE employees SET age = 30
UPDATE employees SET age = '30'
ALTER TABLE employees SET age = 30
SET age = 30 WHERE employees
3.
MULTIPLE CHOICE QUESTION
1 min • 20 pts
What is the SQL query to delete all records from a table named 'orders' where the 'status' is 'cancelled'?
DROP FROM orders WHERE status = 'cancelled';
REMOVE FROM orders WHERE status = 'cancelled';
DELETE FROM orders WHERE status = 'cancelled';
DELETE * FROM orders WHERE status = 'cancelled';
4.
MULTIPLE CHOICE QUESTION
1 min • 20 pts
Create a SQL query to create a table named 'products' with columns 'id' (int), 'name' (varchar), and 'price' (decimal).
CREATE TABLE products (id INT, name VARCHAR(255), price DECIMAL(10,2));
CREATE TABLE products (id INT, name VARCHAR(255), price VARCHAR);
CREATE TABLE products (id INT, name DECIMAL, price VARCHAR(255));
CREATE TABLE products (id VARCHAR, name INT, price DECIMAL(10,2));
5.
MULTIPLE CHOICE QUESTION
1 min • 20 pts
How can you add a new column 'address' (varchar) to an existing table named 'customers'?
CREATE NEW COLUMN address IN customers
ALTER TABLE customers ADD address VARCHAR;
ADD COLUMN address VARCHAR TO customers
UPDATE customers SET address = 'New Address'
6.
MULTIPLE CHOICE QUESTION
1 min • 20 pts
What is the SQL query to drop a table named 'inventory' from the database?
DROP TABLE inventory;
DELETE TABLE inventory;
DROP DATABASE inventory;
REMOVE TABLE inventory;
7.
MULTIPLE CHOICE QUESTION
1 min • 20 pts
Write a SQL query to select the 'name' and 'salary' columns from a table named 'employees' where 'department' is 'IT'.
SELECT name, salary FROM employees WHERE department = 'IT';
SELECT name, salary FROM employees WHERE department = 'Marketing';
SELECT name, salary FROM employees WHERE department = 'Finance';
SELECT name, salary FROM employees WHERE department = 'HR';
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Module 2-4:: Part 1 of 2

Quiz
•
9th - 12th Grade
27 questions
UTS SQL dan Basis Data XIIRPL

Quiz
•
12th Grade
29 questions
Câu hỏi về T-SQL Bài 6

Quiz
•
12th Grade
25 questions
Sprawdzian 2 klasa 1 przełączniki

Quiz
•
8th Grade - University
25 questions
CFT SQL Final Practice

Quiz
•
12th Grade
31 questions
Java/ Фінальний тест

Quiz
•
9th Grade - Professio...
25 questions
HTML, CSS & JS

Quiz
•
11th - 12th Grade
27 questions
My SQL

Quiz
•
11th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
6 questions
Maier - AMDM - Unit 1 - Quiz 1 - Estimation

Quiz
•
12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade
21 questions
9th Grade English Diagnostic Quiz

Quiz
•
9th - 12th Grade
7 questions
Characteristics of Life

Interactive video
•
11th Grade - University