This Quiz contains totally 25 Questions each carry 1 point for you.
1. Which of the following is a SQL data manipulation command?
CREATE
SELECT
DROP
USE
Correct!
Wrong!
2. What is the correct syntax to create a database in MySQL?
MAKE DATABASE testdb;
CREATE DATABASE testdb;
CREATE DATABASE 'testdb';
NEW DATABASE testdb;
Correct!
Wrong!
3. What does the SQL command DROP DATABASE do?
Deletes a database
Disconnects a database
Moves a database
Copies a database
Correct!
Wrong!
4. How do you select all the records from a MySQL table named 'orders'?
SELECT * FROM orders;
SELECT orders;
SELECT ALL orders;
GET * FROM orders;
Correct!
Wrong!
5. How do you delete a table in MySQL?
DELETE TABLE tableName;
REMOVE TABLE tableName;
DROP TABLE tableName;
TRUNCATE TABLE tableName;
Correct!
Wrong!
6. How do you create a table in MySQL with the name 'users' having 'id', 'name', and 'email' as fields?
CREATE TABLE users (id, name, email);
CREATE TABLE users (id INT, name STRING, email STRING);
CREATE TABLE users (id INT, name VARCHAR(100), email VARCHAR(100));
TABLE users CREATE (id, name, email);
Correct!
Wrong!
7. Which MySQL data type is used to store text data?
TEXT
VARCHAR
CHAR
All of the above
Correct!
Wrong!
8. What is the default port for MySQL Server?
3306
8080
80
22
Correct!
Wrong!
9. How do you add a column 'age' to a MySQL table 'users'?
ADD COLUMN age TO users;
ALTER TABLE users ADD age INT;
ADD age TO users;
ALTER TABLE users ADD COLUMN age;
Correct!
Wrong!
10. What is the command to show all databases in MySQL?
SHOW DATABASES;
SHOW ALL DATABASES;
SELECT DATABASES;
SHOW DATABASE;
Correct!
Wrong!
11. What does the SQL keyword NULL mean?
Unknown
Empty
Zero
Not applicable
Correct!
Wrong!
12. Which SQL statement is used to update data in a database?
SAVE
SAVE AS
UPDATE
MODIFY
Correct!
Wrong!
13. What does SQL stand for?
Structured Query Language
Simple Query Language
Structured Question Language
Simplified Query Language
Correct!
Wrong!
14. What does the LIKE operator do in a WHERE clause?
Compares for equality
Matches a pattern
Matches a data type
Matches a database
Correct!
Wrong!
15. Which of the following MySQL statement is used to insert a new record in a table?
ADD NEW RECORD
INSERT INTO
UPDATE
INCLUDE
Correct!
Wrong!
16. In MySQL, how do you select a database for use?
SELECT DATABASE dbname;
USE dbname;
OPEN dbname;
DATABASE USE dbname;
Correct!
Wrong!
17. What does the 'AS' keyword do in a SQL statement?
It deletes a column
It renames a column
It updates a column
It creates a new column
Correct!
Wrong!
18. What is a Primary Key in MySQL?
It is a unique identifier for a record
It is used to ensure data in a column remains unique
It is a link between two tables
All of the above
Correct!
Wrong!
19. Which SQL keyword is used to sort the result-set?
SORT
ORDER BY
GROUP BY
DISTINCT
Correct!
Wrong!
20. What is the purpose of the SQL DISTINCT keyword?
To rename a column
To delete duplicate rows
To add a primary key
To return only distinct (unique) values
Correct!
Wrong!
21. Which SQL statement is used to delete data from a database?
REMOVE
DELETE
DROP
ERASE
Correct!
Wrong!
22. How do you specify a column to be AUTO_INCREMENT in MySQL?
AUTO_INCREMENT column
column AUTO_INCREMENT
column AUTO_INCREMENT()
column AUTO_INCREMENT=TRUE
Correct!
Wrong!
23. What is the maximum length of a table name in MySQL?
64 characters
128 characters
256 characters
No limit
Correct!
Wrong!
24. Which SQL statement is used to return only different values?
SELECT UNIQUE
SELECT DIFFERENT
SELECT DISTINCT
SELECT CHANGED
Correct!
Wrong!
25. What type of JOIN returns all records when there is a match in either left or right table?
INNER JOIN
LEFT JOIN
RIGHT JOIN
FULL OUTER JOIN
Correct!
Wrong!
Share the quiz to show your results !
Subscribe to see your results
Ignore & go to results
MySQL Basic Topics – Quiz
You got %%score%% of %%total%% right
%%description%%
%%description%%
Loading...
