structured query language mcq,sql mcq questions and answers,sql mcq,sql mcq questions,sql mcq class 12,mysql mcq,sql question practice class 12,sql mcq questions with answers,sql mcq test,sql mcq pdf,sql mcq practice,structured query language mcq with answers pdf,sql multiple choice questions with answers pdf,structured query language mcq with answers,structured query language mcq pdf,structured query language mcq online test,structured query language mcq with answers pdf free download,structured query language mcq with answers pdf, download,sql multiple choice questions with answers pdf,
1. What does SQL stand for?
2. Which of the following is not a type of RDBMS?
3. SQL is case sensitive in which environment?
4. Which of the following is a correct SQL statement to create a database named Library?
5. Which command is used to list all databases in MySQL?
6. What is the purpose of the ‘USE’ command in SQL?
7. Which of the following is a valid datatype for storing dates in MySQL?
8. CHAR(n) datatype in MySQL stores data of:
9. Which constraint ensures uniqueness of values in a column?
10. Which two constraints together can form a primary key?
11. What does the ALTER TABLE command do in SQL?
12. Which keyword is used to remove a column from a table?
13. Which command is used to view the structure of a table?
14. What type of key is formed by combining multiple attributes?
15. What happens if you run an UPDATE statement without a WHERE clause?
16. Which statement is used to insert data into a table?
17. In which format is the DATE stored in MySQL?
18. Which operator is used to compare a value with a set of values?
19. Which SQL function returns the remainder of a division operation?
20. Which function is used to calculate exponential power in SQL?
21. Which clause is used to sort records in ascending or descending order?
22. Which keyword is used with ORDER BY to sort in descending order?
23. Which function returns the name of the day from a date?
24. Which clause helps in fetching only unique values from a column?
25. What is the result of any arithmetic operation with NULL?
26. Which function returns current date and time in SQL?
27. Which of the following is used for pattern matching in SQL?
28. Which symbol is used to match any number of characters in SQL pattern matching?
29. Which SQL function removes leading spaces from a string?
30. Which function converts string to uppercase in SQL?
31. Which clause is used to group rows that have the same values?
32. Which function returns the number of characters in a string?
33. Which clause is used to filter rows before grouping?
34. Which clause is used to filter groups after grouping?
35. Which aggregate function returns the highest value in a column?
36. Which clause in SQL is used to group records that have the same values in specified columns?
37. Which operator is used to test for NULL values?
38. What will be the result of 5 + NULL in SQL?
39. Which function extracts a substring from a string?
40. What is the output of ROUND(123.456, 1)?
41. Which keyword is used to permanently remove a table from a database?
42. What is the output of MOD(11, 3)?
43. What is the purpose of the DEFAULT constraint?
44. Which operator is used to match a value within a range?
45. Which one is not a single row function?
46. Which function is used to get the month from a date?
47. Which of the following is a valid constraint that can be applied to enforce referential integrity between two tables?
48. Which of the following conditions must be satisfied for a FOREIGN KEY to be added to a table?
49. Which SQL operator is used to check whether a column value falls between two values (inclusive)?
50. Which keyword is used to delete a particular row in SQL?
51. Assertion (A): SQL is used only for retrieving data from databases. Reason (R): SQL stands for Structured Query Language.
52. Assertion (A): VARCHAR stores variable-length character strings. Reason (R): CHAR and VARCHAR allocate the same amount of memory for any string.
53. Assertion (A): PRIMARY KEY allows duplicate values in a column. Reason (R): PRIMARY KEY is used to uniquely identify each record.
54. Assertion (A): ALTER TABLE statement can be used to add a new column. Reason (R): ALTER TABLE can modify the structure of an existing table.
55. Assertion (A): The keyword DESC is used to sort records in descending order. Reason (R): The ORDER BY clause displays records in random order by default.
56. Assertion (A): SQL is a case-insensitive language. Reason (R): In SQL, ‘salary’ and ‘SALARY’ are treated as the same column names.
57. Assertion (A): The CREATE TABLE command is used to define the structure of a new table. Reason (R): CREATE TABLE can define attribute names, data types, and constraints.
58. Assertion (A): DEFAULT constraint ensures that every column must have a unique value. Reason (R): DEFAULT sets a predefined value for a column when no value is provided.
59. Assertion (A): DELETE statement removes a table from the database. Reason (R): DROP TABLE statement is used to remove a table permanently.
60. Assertion (A): The WHERE clause in SQL is used to filter groups formed by GROUP BY. Reason (R): HAVING clause filters records before they are grouped.
61. Assertion (A): INSERT INTO command adds new records into a table. Reason (R): Records can be inserted without specifying column names if all values are provided in correct order.
62. Assertion (A): A FOREIGN KEY can reference a column that is not a primary key. Reason (R): A foreign key ensures that each value exists in another table’s primary key column.
63. Assertion (A): ROUND() is used to round numbers to specified decimal places. Reason (R): ROUND(283.2, 0) will return 283.2.
64. Assertion (A): The % symbol in SQL is used to match zero or more characters. Reason (R): The LIKE clause in SQL supports pattern matching using wildcards.
65. Assertion (A): The BETWEEN operator is inclusive of boundary values. Reason (R): BE- TWEEN is used to test if a value lies between a specified range.
66. Assertion (A): You can use the alias keyword AS to rename a column in the output. Reason (R): Column aliasing affects the actual table structure permanently.
67. Assertion (A): NOW() function returns the current system date and time. Reason (R): NOW() is a date function used in MySQL.
68. Assertion (A): MID() function is used to extract a part of a string. Reason (R): MID() is a numeric function used to perform arithmetic operations.
69. Assertion (A): The TRIM() function is used to remove trailing spaces only. Reason (R): TRIM() removes both leading and trailing spaces from a string.
70. Assertion (A): The IS NULL operator is used to check for zero values. Reason (R): IS NULL checks whether a column has NULL as its value.

No comments: