Skip to main content

MySQL MCQs Part 2

 Here are 10 more MySQL MCQs for UGC NET, SET, EMRS, KVS, ISRO, and Assistant Professor exams.


11. What is the purpose of the HAVING clause in MySQL?

A) It filters records before grouping
B) It filters records after grouping
C) It is used to rename columns
D) It is used to join tables

Answer: B) It filters records after grouping


12. Which MySQL function is used to count the number of rows in a table?

A) COUNT()
B) SUM()
C) TOTAL()
D) NUMBER()

Answer: A) COUNT()


13. What does the FOREIGN KEY constraint do in MySQL?

A) Ensures unique values in a column
B) Links a column to a primary key in another table
C) Automatically increments a column value
D) Restricts NULL values in a column

Answer: B) Links a column to a primary key in another table


14. Which command is used to create a backup of a MySQL database?

A) BACKUP DATABASE
B) SAVE DATABASE
C) mysqldump
D) EXPORT DATABASE

Answer: C) mysqldump


15. Which MySQL JOIN returns only matching rows from both tables?

A) LEFT JOIN
B) RIGHT JOIN
C) INNER JOIN
D) FULL JOIN

Answer: C) INNER JOIN


16. How can you change the structure of an existing MySQL table?

A) MODIFY TABLE
B) ALTER TABLE
C) UPDATE TABLE
D) CHANGE TABLE

Answer: B) ALTER TABLE


17. What is the maximum length of a VARCHAR column in MySQL?

A) 255
B) 512
C) 65535
D) 16384

Answer: C) 65535 (depends on row size)


18. What will happen if you use the DROP TABLE command in MySQL?

A) It will remove the table but keep the data
B) It will delete all rows but keep the table structure
C) It will permanently remove the table and its data
D) It will disable the table temporarily

Answer: C) It will permanently remove the table and its data


19. Which MySQL statement is used to retrieve unique records from a table?

A) SELECT UNIQUE
B) SELECT DISTINCT
C) SELECT FILTER
D) SELECT DIFFERENT

Answer: B) SELECT DISTINCT


20. What does the GROUP BY clause do in MySQL?

A) It sorts the data in ascending order
B) It groups records that have the same values in specified columns
C) It deletes duplicate rows from a table
D) It updates multiple records at once

Answer: B) It groups records that have the same values in specified columns



Comments

Popular posts from this blog

Top 5 Safe Chat Apps for Kids with Parental Controls

Now a days kids are growing up with technology at their fingertips. While communication apps help children stay connected with family and friends, safety remains a top concern for parents. Unregulated platforms can expose children to inappropriate content, online predators, and cyberbullying. That’s why choosing a kid-friendly chat app with parental controls is essential. To help parents find the best options, we’ve compiled a list of the top five safest chat apps for kids that offer safe and controlled environment. 1. Messenger Kids (By Meta) Best for: Safe video calls and text messaging with parental supervision Features: Parents approve all contacts No ads or in-app purchases Fun filters, stickers, and games Monitored messaging and activity reports Why It’s Safe: Messenger Kids is designed for children under 13 and requires parental approval for every contact. Parents can monitor chats and control screen time through the Parent Dashboard. Download Messenger Kids 2...

10 Distance Vector and Link-State Routing MCQ

  10 multiple-choice questions  on  Distance Vector and Link-State Routing with explanations, useful for  UGC NET, SET, GATE, ISRO, and other competitive exams . Question 1: Basic Concept of Distance Vector Routing Q1: In a distance vector routing protocol, how do routers share routing information? A) By flooding the entire network with routing updates B) By periodically exchanging routing tables with their immediate neighbors C) By using a link-state database to determine the shortest path D) By dynamically updating paths based on link failure reports Answer: B) By periodically exchanging routing tables with their immediate neighbors Explanation: In Distance Vector Routing, routers share their routing tables with neighbors at regular intervals, leading to a simple but slow convergence mechanism. Question 2: Example of Distance Vector Routing Protocol Q2: Which of the following is an example of a Distance Vector routing protocol? A) OSPF ...

AI from Class 3: India’s Big Leap into the Future of Learning

Imagine that, it's a morning in 2026. In a classroom, a teacher holds up a tablet. Instead of reciting multiplication tables, a group of eight-year-olds watches a tiny animation explaining how computers “learn” from patterns. A curious hand shoots up. “Ma’am, does that mean my phone is smarter than me?” The class bursts into laughter, but the question lingers. That, in essence, is the beginning of India’s new chapter — where Artificial Intelligence is no longer a distant, sci-fi term, but a part of early education. The Turning Point The Central Board of Secondary Education (CBSE) has drafted a plan to introduce AI as a subject from Class 3 to Class 12 , a first in the country’s education history. The proposal, now with NCERT for expert review, aims to roll out by April 2026 . If all goes to plan, teacher training will begin next year, resource books and digital tools will follow, and by the time the next generation steps into school, “AI” will sit alongside English, Science,...