About MYSQL

Following are some of the multiple choice questions on the MYSQL with answers that will help the students in developing their knowledge.

MYSQL MCQ

1. MySQL is

  • A Programming language
  • A technique for writing reliable programs
  •  A Relational Database Management System
  • None of the Above

2. Which type of database management system is MySQL?

  • Object-oriented
  • Hierarchical
  • Relational
  • Network

3. What is the full form of SQL?

  • Structured Query Language
  • Structured Query List
  • Simple QueryLanguage
  • None of these

4. The _________ statement is used to delete a table.

  • DROP TABLE
  • DELETE TABLE
  • DEL TABLE
  • REMOVE TABLE

5. What will be the output of the following query:Select round(59999.99,-2);

  • 59999
  • 59900
  • 60000
  • 59990

6. Which of the following is not a relational operator?

  • &&
  • >=
  • !=
  • =

7. Which of the following is not a valid aggregate function?

  • COUNT
  • MIN
  • COMPUTE
  • MAX

8. Which of the following scripts will run successfully?

  • SELECT customer name FROM customers;
  • SELECT FROM `customers` 'customer name';
  • SELECT `customer name` FROM customers ORDER BY zone WHERE cat_id = 12;
  • SELECT `customer name` FROM customers WHERE cat_id = 12 ORDER BY cat_id;

9. What will be printed by the given query? SELECT LENGTH("WINNER");

  • 7
  • 6
  • 8
  • 9

10. What will be returned by the given query? SELECT round(153.669, 2);

  • 153.6
  • 153.66
  • 153.67
  • 153.7

11. Which SQL statement is used to return only different values?

  • SELECT DISTINCT
  • SELECT UNIQUE
  • SELECT DIFF
  • SELECT DIFFERENT

12. With SQL, how do you select all the columns from a table named "Persons"?

  • SELECT * FROM Persons
  • SELECT Persons
  • SELECT [all] FROM Persons
  • SELECT *.Persons

13. What will be returned by the given query? SELECT INSTR("INDIA", "DI");

  • 2
  • 3
  • -2
  • -3

14. Which of the following is not a DML command?

  • Update
  • Insert into
  • Delete
  • Create Table

15. SQL can be used to:

  • Create database structures only.
  • Query database data only.
  • Modify database data only.
  • All of the above can be done by SQL.

16. Which of the following can add a row to a table?

  • Add
  • Insert
  • Update
  • Alter

17. Which of the following is not a date function?

  • Month
  • Year
  • Now
  • Pow

18. What will be returned by the given query? SELECT concat("It", "was", "ok");

  • "It was ok"
  • "Itwasok"
  • "Itwas ok"
  • "Tt wasok"

19. The SQL keyword BETWEEN is used:

  • For ranges.
  • To limit the columns displayed.
  • As a wildcard.
  • None of the above

20. Which of the following is not a numeric function?

  • MOD
  • SIGN
  • MID
  • POW

21. The term ___________ is used to refer a column.

  • Row
  • Record
  • Tuple
  • Attribute

22. In a LIKE clause, you can ask for any 6 letter value by writing

  • LIKE ______ (that's six underscore characters)
  • LIKE ...... (that's six dots)
  • LIKE .{6}
  • LIKE ??????

23. Which of the following are valid column names?

  • Marks Eng
  • 66_Marks
  • Marks_Eng
  • #Eng_Marks

24. What will be returned by the given query? SELECT month('2020-05-11');

  • 5
  • 11
  • May
  • November

25. What SQL clause is used to restrict the rows returned by a query?

  • AND
  • WHERE
  • HAVING
  • FROM

26. What will be returned by the given query? SELECT sign(26);

  • 1
  • -1
  • 0
  • none

27. Which statement is used to modify data in a table?

  • CHANGE
  • MODIFY
  • UPDATE
  • SAVE AS

28. Which of the following is not a text function?

  • TRIM()
  • TRUNCATE()
  • LEFT()
  • MID()

29. Which of the following is not a keyword of MYSQL?

  • Select
  • Top
  • Group
  • Insert

30. Which one of the following sorts rows in SQL?

  • SORT BY
  • ALIGN BY
  • GROUP BY
  • ORDER BY

31. Which SQL function is used to find the average value of any column?

  • Mean()
  • Avg()
  • Average()
  • Sum()

32. Which is not an aggregate function?

  • SUM()
  • POW()
  • AVG()
  • COUNT()

33. Which operator is used to match column values against a list of values?

  • between
  • IN
  • Like
  • Is Null

34. Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.

  • Select first_name from employess where first_name LIKE '%A';
  • Select first_name from employess where first_name LIKE "'A'%";
  • Select first_name from employess where first_name LIKE 'A%';
  • Select first_name from employess where first_name LIKE '%A%';

35. The maximum length of char data type is

  • 65535 bytes
  • 255 bytes
  • 256 bytes
  • 456 bytes

36. In MySQL, which command is used to modify the table values

  • Select
  • Alter
  • Modify
  • Update

37. Which function will be used to remove only the trailing spaces from a string?

  • ltrim()
  • rtrim()
  • trim()
  • all

38. Which is the default order of sort in ORDER BY clause?

  • Ascending
  • Descending

39. An organized collection of data stored in a central location is known as?

  • database
  • flat file
  • csv
  • none of these

40. The updated MySQL extension with PHP5 is typically referred to as

  • MySQL
  • mysql
  • mysqli
  • mysqly

41. Which method returns the error code generated from the execution of the last MySQL function?

  • errno()
  • errnumber()
  • errorno()
  • errornumber()

42. Which one of the following methods can be used to diagnose and display info about a MySQL connection error?

  • connect_errno()
  • connect_error()
  • mysqli_connect_errno()
  • mysqli_connect_error()

43. The “father” of MySQL is ______.

  • Michael Widenius
  • Stephanie Wall
  • Bill Joy
  • None of these

44. Which of the following is not a feature of MySQL?

  • Password protected
  • Not open source software
  • Runs very fast
  • Supports many data types

45. "CREATE TABLE" statement falls to which category of comand of MYSQL?

  • DML
  • DCL
  • TCL
  • DDL

46. If I want to show all data in a MySQL table, I would use

  • SHOW * FROM table;
  • SELECT * FROM table;
  • SHOW * IN table;
  • SELECT * IN table;

47. A relational database ___________ is a data structure used to store and organize information.

  • View
  • Table
  • Report
  • Stored Procedure

48. Which of the following query is correct to get Current Date from Query?A. SELECT DATE ( NOW() ) as today;B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;

  • SELECT DATE ( NOW() ) as today;
  • SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
  • Both A and B
  • None

49. What does SQL stand for?

  • Structured Query Language
  • Structured Question Language
  • Strong Question Language
  • None of the above

50. Which clause is used to “Filters out unwanted data”?

  • FROM
  • SELECT
  • ORDER BY
  • WHERE

Enjoyed the Quiz. Share this with friends

Comments

Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.