
Understanding MySQL and SQL Concepts
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Bhuvi Eswari
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between MySQL and SQL?
MySQL is a programming language; SQL is a database.
SQL is a type of software; MySQL is a query language.
MySQL is a cloud service; SQL is a local database.
SQL is a language; MySQL is a database management system that uses SQL.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write a SQL query to create a table called 'students' with columns 'roll_no', 'name', 'class', and 'marks'.
CREATE TABLE students (id INT, name TEXT, grade VARCHAR(50), score INT);
CREATE TABLE students (roll_no INT, full_name VARCHAR(100), class_name VARCHAR(50), total_marks DECIMAL);
CREATE TABLE learners (roll_no INT, name VARCHAR(100), section VARCHAR(50), marks INT);
CREATE TABLE students (roll_no INT, name VARCHAR(100), class VARCHAR(50), marks FLOAT);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the PRIMARY KEY constraint in MySQL?
To group multiple records together in a table.
To uniquely identify each record in a table and enforce data integrity.
To automatically generate unique IDs for each record.
To define the data type of each column in a table.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write a SQL query to insert data into the 'students' table.
UPDATE students SET age = 20 WHERE name = 'John Doe';
DELETE FROM students WHERE name = 'John Doe';
SELECT * FROM students WHERE name = 'John Doe';
INSERT INTO students (name, age) VALUES ('John Doe', 20);
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between DELETE and TRUNCATE commands in MySQL?
DELETE removes all rows and cannot be rolled back; TRUNCATE is row-specific and can be rolled back.
DELETE is row-specific and can be rolled back; TRUNCATE removes all rows quickly and cannot be rolled back.
TRUNCATE can be rolled back; DELETE cannot be rolled back.
DELETE is faster than TRUNCATE and is used for large datasets; TRUNCATE is slower and used for small datasets.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the role of foreign keys in relational databases.
Foreign keys are primarily used for data encryption.
Foreign keys are used to create indexes on tables.
Foreign keys enforce referential integrity between tables in a relational database.
Foreign keys allow for the duplication of data across tables.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write a SQL query to update the marks of a student in the 'students' table.
UPDATE students SET marks = new_marks WHERE student_id = specific_id;
UPDATE students SET score = new_marks WHERE id = specific_id;
UPDATE students SET marks = specific_marks WHERE student_id = new_id;
UPDATE students SET marks = new_marks;
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Fundamentals of Computing - Unit 5 Quiz 1 Review
Quiz
•
12th Grade
10 questions
Technology Integration
Quiz
•
5th Grade - University
15 questions
Twitter 101
Quiz
•
KG - 12th Grade
15 questions
Preguntas sobre SQL
Quiz
•
9th - 12th Grade
10 questions
Functions In Python
Quiz
•
12th Grade
15 questions
Learning SQL
Quiz
•
11th - 12th Grade
15 questions
Chapter 5 Vocabulary Review
Quiz
•
12th Grade
15 questions
Introduction to SQL (Grade 12)
Quiz
•
11th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
