Smart Future Point

MY SQL MCQ

1. What does SQL stand for?



2. Which of the following is a valid SQL statement to retrieve data from a database?



3. Which SQL statement is used to update data in a database?



4. Which of the following is used to delete data from a database?



5. Which SQL statement is used to create a new table in a database?



6. Which of the following is used to modify the structure of an existing table?



7. What is the purpose of the `JOIN` clause in SQL?



8. Which of the following is a type of JOIN in SQL?



9. What is the default sorting order of the `ORDER BY` clause in SQL?



10. Which SQL statement is used to create an index in a database?



11. What is the purpose of the `GROUP BY` clause in SQL?



12. Which of the following is used to retrieve unique values from a column in SQL?



13. What is the purpose of the `HAVING` clause in SQL?



14. Which of the following is a valid SQL statement to count the number of rows in a table?



15. What is the purpose of the `LIMIT` clause in SQL?



16. Which of the following SQL statements is used to create a view?



17. What is the purpose of the `UNION` operator in SQL?



18. Which of the following is a valid SQL statement to drop a table?



19. What is the purpose of the `FOREIGN KEY` constraint in SQL?



20. Which of the following SQL functions is used to find the maximum value in a column?



21. What SQL clause is used to filter the results of a query?



22. Which keyword is used to sort the result-set in SQL?



23. Which SQL statement is used to remove a table from a database?



24. What does the COUNT() function do in SQL?



25. What is the default port for MySQL?



26. Which command is used to remove all records from a table in MySQL?



27. Which SQL clause is used to group rows that have the same values?



28. What does the `LIMIT` clause do in a SQL query?



29. Which command is used to change a table structure in MySQL?



30. What type of join returns only matching rows from two tables?



31. What is the use of the `HAVING` clause in SQL?



32. Which SQL keyword is used to retrieve unique values?



33. What command is used to delete a table from a database?



34. What is a stored procedure in MySQL?



35. Which command is used to update data in a table?



36. What is the function of the `NOW()` function in MySQL?



37. Which function is used to calculate the total of a numeric column?



38. What is the purpose of the `AUTO_INCREMENT` attribute in MySQL?



39. What is the default storage engine in MySQL?



40. What is the role of the `INDEX` in MySQL?



41. Which SQL clause is used to remove duplicate records?



42. What does the `TRUNCATE` command do in MySQL?



43. Which clause is used to filter records returned by a query?



44. What is the purpose of `GROUP BY` in SQL?



45. How do you sort query results in ascending or descending order?



46. Which function returns the average value of a numeric column?



47. What is the correct syntax to rename a table?



48. What does `LIMIT` do in a SELECT query?



49. What does `IS NULL` check in SQL?



50. Which function counts the number of rows returned by a query?



MySQL Short Questions

1. What is MySQL?

2. What are the main features of MySQL?

3. What is a primary key in MySQL?

4. What are the different data types in MySQL?

5. What is an index in MySQL?

6. What are the different types of joins in MySQL?

7. What is a stored procedure in MySQL?

8. What is a trigger in MySQL?

9. What is the difference between DELETE and TRUNCATE in MySQL?

10. What is the difference between WHERE and HAVING in MySQL?

11. What is normalization in MySQL?

12. Explain the different types of JOINs in MySQL.

13. What is the use of the AUTO_INCREMENT attribute in MySQL?

14. How can you retrieve the current date in MySQL?

15. What is the purpose of the PRIMARY KEY constraint in MySQL?

16. How do you create an index in MySQL?

17. What is a view in MySQL?

18. How can you change a column name in MySQL?

19. What is a composite key in MySQL?

20. How do you update data in a table using SQL?

21. What are the ACID properties in MySQL?

22. What is a subquery in MySQL?

23. How do you check for NULL values in MySQL?

24. What is the difference between CHAR and VARCHAR in MySQL?

25. What is the use of the DISTINCT keyword in MySQL?

26. What is the difference between NOW() and CURRENT_DATE() in MySQL?

27. How can you retrieve the number of rows in a table?

28. How can you prevent SQL injection in MySQL?

29. What is the difference between UNION and UNION ALL in MySQL?

30. How can you backup a MySQL database?

31. What is a schema in MySQL?

32. How do you drop a table in MySQL?

33. What is the difference between IN and EXISTS in MySQL?

34. What is the purpose of the GROUP BY clause in MySQL?

35. How do you rename a table in MySQL?

36. What is a temporary table in MySQL?

37. How do you use the LIMIT clause in MySQL?

38. How do you sort query results in MySQL?

39. What is the difference between DROP and DELETE commands in MySQL?

40. How do you check the structure of a table in MySQL?

41. What is the use of the LIKE operator in MySQL?

42. How do you create a new user in MySQL?

43. What is the use of GRANT and REVOKE statements in MySQL?

44. How do you check current user privileges in MySQL?

45. What is the purpose of the CASE statement in MySQL?

46. How do you perform pattern matching in MySQL?

47. What is the difference between ISNULL() and IFNULL() in MySQL?

48. How do you optimize a slow-performing query in MySQL?

49. What is the purpose of the EXPLAIN keyword in MySQL?

50. How do you import and export data in MySQL?

Coumputer Course

Popular Courses

(123)
Web Development
(123)
FULL STACK JAVA
PROGRAMING
(123)
PYTHON PROGRAMING
smartfuturepoint