This Quiz contains totally 25 Questions each carry 1 point for you.
1. What is the primary use of the SELECT statement in SQL?
To delete data from a database
To update data in a database
To retrieve data from a database
To create a new database
Correct!
Wrong!
2. Which SQL keyword is used to specify a condition while retrieving the data?
SELECT
WHERE
ORDER BY
FROM
Correct!
Wrong!
3. What does the AND operator do in a SQL query?
It allows you to select all records
It combines two conditions and returns a record if both conditions are true
It updates the data in the database
It sorts the result-set in ascending or descending order
Correct!
Wrong!
4. What does the OR operator do in a SQL query?
It selects all records
It combines two conditions and returns a record if either of the conditions is true
It updates the data in the database
It sorts the result-set in ascending or descending order
Correct!
Wrong!
5. What does the NOT operator do in a SQL query?
It reverses the meaning of the logical operator
It combines two conditions
It updates the data in the database
It sorts the result-set in ascending or descending order
Correct!
Wrong!
6. How is the ORDER BY keyword used in SQL?
To delete data
To insert new data
To sort the result-set in ascending or descending order
To update data
Correct!
Wrong!
7. What does the INSERT INTO statement do in SQL?
It retrieves data from the database
It inserts new data into a database
It updates existing data in a database
It deletes data from a database
Correct!
Wrong!
8. Which SQL statement is used to update data in a database?
SELECT
DELETE
INSERT INTO
UPDATE
Correct!
Wrong!
9. Which SQL statement is used to delete data from a database?
DELETE
UPDATE
SELECT
INSERT INTO
Correct!
Wrong!
10. What would be the correct SQL statement to select all the records from a table named "Students"?
SELECT * FROM Students
SELECT ALL FROM Students
SELECT Students
SELECT Students ALL
Correct!
Wrong!
11. What does the following SQL statement do? SELECT * FROM Customers WHERE Country='Germany';
It selects all customers who are not from Germany
It selects all customers who are from Germany
It deletes all customers who are from Germany
It updates all customers who are from Germany
Correct!
Wrong!
12. What will the following SQL statement do? SELECT * FROM Customers WHERE Country='Germany' AND City='Berlin';
It selects all customers who are either from Germany or Berlin
It selects all customers who are from Germany and their city is Berlin
It updates all customers who are from Germany and their city is Berlin
It deletes all customers who are from Germany and their city is Berlin
Correct!
Wrong!
13. What will the following SQL statement do? SELECT * FROM Customers WHERE Country='Germany' OR Country='France';
It selects all customers who are either from Germany or France
It selects all customers who are from both Germany and France
It updates all customers who are either from Germany or France
It deletes all customers who are either from Germany or France
Correct!
Wrong!
14. What will the following SQL statement do? SELECT * FROM Customers ORDER BY Country;
It selects all customers and sorts them by their country in ascending order
It deletes all customers and sorts them by their country in ascending order
It updates all customers and sorts them by their country in ascending order
It inserts all customers and sorts them by their country in ascending order
Correct!
Wrong!
15. What will the following SQL statement do? SELECT * FROM Customers ORDER BY Country DESC;
It selects all customers and sorts them by their country in ascending order
It selects all customers and sorts them by their country in descending order
It deletes all customers and sorts them by their country in descending order
It updates all customers and sorts them by their country in descending order
Correct!
Wrong!
16. What does the following SQL statement do? INSERT INTO Customers (CustomerName, ContactName, Country) VALUES ('Cardinal', 'Tom B. Erichsen', 'Norway');
It retrieves data from the "Customers" table
It updates data in the "Customers" table
It deletes data from the "Customers" table
It inserts a new record in the "Customers" table
Correct!
Wrong!
17. What does the following SQL statement do? UPDATE Customers SET ContactName='Alfred Schmidt', City='Hamburg' WHERE CustomerName='Alfreds Futterkiste';
It updates the "ContactName" and "City" for all customers
It updates the "ContactName" and "City" for the customer 'Alfreds Futterkiste'
It deletes the "ContactName" and "City" for the customer 'Alfreds Futterkiste'
It inserts the "ContactName" and "City" for the customer 'Alfreds Futterkiste'
Correct!
Wrong!
18. What does the following SQL statement do? DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste';
It deletes all customers
It deletes the customer 'Alfreds Futterkiste'
It updates the customer 'Alfreds Futterkiste' '
It retrieves the customer 'Alfreds Futterkiste
Correct!
Wrong!
19. What is the default order in which the ORDER BY clause sorts the records?
Ascending order
Descending order
Random order
Chronological order
Correct!
Wrong!
20. Which SQL keyword is used to reverse the default order of the records sorted by the ORDER BY clause?
REVERSE
INVERSE
DESC
ASC
Correct!
Wrong!
21. Which of the following SQL keywords are used to combine conditions?
AND, OR, NOT
AND, NOR, BUT
OR, BUT, NOT
IF, THEN, ELSE
Correct!
Wrong!
22. What does the following SQL statement do? SELECT * FROM Customers WHERE NOT Country='Germany';
It selects all customers who are from Germany
It selects all customers who are not from Germany
It deletes all customers who are not from Germany
It updates all customers who are not from Germany
Correct!
Wrong!
23. Which SQL statement is used to insert new data into a database?
UPDATE
SELECT
INSERT INTO
DELETE
Correct!
Wrong!
24. What does the following SQL statement do? UPDATE Customers SET ContactName='Juan' WHERE Country='Mexico';
It updates the "ContactName" for all customers to 'Juan'
It updates the "ContactName" to 'Juan' for all customers from Mexico
It deletes all customers from Mexico
It inserts a new customer named 'Juan' from Mexico
Correct!
Wrong!
25. What is the effect of the following SQL statement? DELETE FROM Customers WHERE Country='Germany';
It deletes all customers from the "Customers" table
It deletes all customers from Germany in the "Customers" table
It updates all customers from Germany in the "Customers" table
It selects all customers from Germany in the "Customers" table
Correct!
Wrong!
Share the quiz to show your results !
Subscribe to see your results
Ignore & go to results
MYSQL Basic Queries -Quiz
You got %%score%% of %%total%% right
%%description%%
%%description%%
Loading...