
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
17 questions
DatabaseBasic

Quiz
•
12th Grade
24 questions
Structured Query Language

Quiz
•
12th Grade
20 questions
BASIS DATA KELAS XII RPL

Quiz
•
12th Grade
15 questions
SQL

Quiz
•
11th - 12th Grade
19 questions
SQL Basics

Quiz
•
9th - 12th Grade
18 questions
SQL Tingkatan 5 SPM

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

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

Quiz
•
12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade