
SQL Quiz

Quiz
•
Computers
•
12th Grade
•
Medium
Wasiha Tasneem
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Create a SQL query to create a table named 'Students' with columns 'id' of type INT, 'name' of type VARCHAR(50), and 'age' of type INT.
CREATE TABLE Students (id VARCHAR(50), name INT, age VARCHAR(50));
INSERT INTO Students (id INT, name VARCHAR(50), age INT);
CREATE TABLE Students (id INT, name VARCHAR(50), age INT);
UPDATE Students SET id INT, name VARCHAR(50), age INT;
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Write a SQL query to create a table named 'Employees' with columns 'emp_id' of type INT, 'emp_name' of type VARCHAR(50), 'emp_salary' of type DECIMAL(10,2), and 'emp_join_date' of type DATE.
CREATE TABLE Employees (emp_id INT, emp_name VARCHAR(50), emp_salary DECIMAL(10,2), emp_join_date DATE);
CREATE TABLE Employees (emp_id DECIMAL(10,2), emp_name DATE, emp_salary VARCHAR(50), emp_join_date INT);
CREATE TABLE Employees (emp_id DATE, emp_name DECIMAL(10,2), emp_salary INT, emp_join_date VARCHAR(50));
CREATE TABLE Employees (emp_id VARCHAR(50), emp_name INT, emp_salary DATE, emp_join_date DECIMAL(10,2));
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Design a SQL query to create a table named 'Products' with columns 'product_id' of type INT, 'product_name' of type VARCHAR(100), 'price' of type DECIMAL(8,2), and 'quantity' of type INT.
CREATE TABLE Products (product_id VARCHAR(50), product_name VARCHAR(255), price DECIMAL(10,2), quantity INT);
CREATE TABLE Products (product_id INT, product_name VARCHAR(100), price DECIMAL(8,2), quantity INT);
CREATE TABLE Products (id INT, name VARCHAR(100), price DECIMAL(8,2), qty INT);
CREATE TABLE Products (product_id INT, product_name TEXT, price DECIMAL(8,2), quantity INT);
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the data types in SQL with examples.
Data types in SQL include apple, banana, orange, grape, and watermelon among others.
Data types in SQL include integer, float, char, varchar, date, and boolean among others.
Data types in SQL include cat, dog, bird, fish, and rabbit among others.
Data types in SQL include red, blue, green, yellow, and purple among others.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the different data types available in SQL? Provide examples for each data type.
Text, Number, DateTime
String, Boolean, Float
Character, Integer, Boolean
INT, VARCHAR, DATE
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Discuss the importance of data types in SQL and how they are used in table creation.
Data types in SQL are used in table creation to specify the color of the text
Data types in SQL are important for defining the type of data that can be stored in a column. They are used in table creation to specify the type of data that each column can hold, such as integer, text, date, etc.
Data types in SQL are used in table creation to specify the type of font used
Data types in SQL are not important for defining the type of data that can be stored in a column
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Explain the concept of constraints in SQL and provide examples of different types of constraints.
Constraints in SQL are used to enhance the performance of queries
Constraints in SQL are rules that are used to limit the type of data that can go into a table. Examples of constraints include NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK constraints.
Examples of constraints include formatting rules for data input
Constraints in SQL are only applicable to numeric data types
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
MySQL-Grade XII IP

Quiz
•
12th Grade
15 questions
Sains Komputer Tingkatan 5 - 2.1.3 SQL: Membina Pangkalan..

Quiz
•
10th - 12th Grade
17 questions
DatabaseBasic

Quiz
•
12th Grade
20 questions
SQL Quiz

Quiz
•
12th Grade
20 questions
CompTIA ITF+ - Database Vocabulary

Quiz
•
9th - 12th Grade
15 questions
SQL & Python Connectivity

Quiz
•
12th Grade
18 questions
GCSE Computer Science Data types

Quiz
•
10th - 12th Grade
20 questions
SQL Quiz

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade