PlacementPrep
Practice › Technical › CSE/IT › DBMS and SQL
Technical · CSE / IT

DBMS and SQL MCQs for placement tests

20 technical questions of moderate difficulty, as asked in campus placement and company tests. Each has a short explanation.

Q1CSE/IT · DBMS and SQLModerate

Which SQL command removes all rows from a table but keeps the table structure?

Q2CSE/IT · DBMS and SQLModerate

Which normal form removes partial dependencies?

Q3CSE/IT · DBMS and SQLModerate

Which normal form removes transitive dependencies?

Q4CSE/IT · DBMS and SQLModerate

What does the 'A' in ACID stand for?

Q5CSE/IT · DBMS and SQLModerate

Which key uniquely identifies each row in a table and cannot be NULL?

Q6CSE/IT · DBMS and SQLModerate

A foreign key is used to:

Q7CSE/IT · DBMS and SQLModerate

What does this query return?

CREATE TABLE emp(name TEXT, salary INT);
INSERT INTO emp VALUES ('Asha', 50000), ('Ravi', 45000), ('Meena', 30000);
SELECT COUNT(*) FROM emp WHERE salary > 40000;
Q8CSE/IT · DBMS and SQLModerate

What does this query return?

CREATE TABLE emp(name TEXT, dept TEXT);
INSERT INTO emp VALUES ('A','IT'), ('B','IT'), ('C','HR');
SELECT dept, COUNT(*) FROM emp GROUP BY dept HAVING COUNT(*) > 1;
Q9CSE/IT · DBMS and SQLModerate

Which clause filters groups after GROUP BY?

Q10CSE/IT · DBMS and SQLModerate

Which join returns all rows from the left table and matching rows from the right table?

Q11CSE/IT · DBMS and SQLModerate

What does this query return?

CREATE TABLE emp(name TEXT, salary INT);
INSERT INTO emp VALUES ('Asha', 50000), ('Ravi', 45000), ('Meena', 30000);
SELECT MAX(salary) FROM emp WHERE salary < (SELECT MAX(salary) FROM emp);
Q12CSE/IT · DBMS and SQLModerate

Which SQL keyword removes duplicate rows from a result?

Q13CSE/IT · DBMS and SQLModerate

Which of these is a DDL (Data Definition Language) command?

Q14CSE/IT · DBMS and SQLModerate

Which of these is a DML (Data Manipulation Language) command?

Q15CSE/IT · DBMS and SQLModerate

What does COMMIT do in a transaction?

Q16CSE/IT · DBMS and SQLModerate

In an ER diagram, a relationship where one row of A relates to many rows of B is:

Q17CSE/IT · DBMS and SQLModerate

What does this query return?

CREATE TABLE c(id INT, name TEXT);
CREATE TABLE o(oid INT, cid INT);
INSERT INTO c VALUES (1,'A'), (2,'B');
INSERT INTO o VALUES (1,1), (2,1), (3,2);
SELECT COUNT(*) FROM c JOIN o ON c.id = o.cid;
Q18CSE/IT · DBMS and SQLModerate

Which aggregate function ignores NULL values?

Q19CSE/IT · DBMS and SQLModerate

An index on a column mainly helps to:

Q20CSE/IT · DBMS and SQLModerate

Which property ensures that once a transaction commits, its changes survive a crash?

Want guided preparation? Placement Papers Prep courses by Dr. Kiran Derle, with video lessons and full-length mocks.

See placement courses ↗