TomoLink
TCS NQT GuideTCS NQT Programming Logic & CS FundamentalsDBMS and SQL Queries Practice Questions

DBMS and SQL Queries Practice Questions

Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.

Key Concepts & Formulas

  • 1Primary Key: Uniquely identifies rows, cannot be NULL.
  • 2Foreign Key: Link fields between tables, maintains referential integrity.
  • 3SQL Commands: SELECT, WHERE, GROUP BY, HAVING.

TCS NQT Style Practice Questions

Practice Question 1

Which SQL command is used to select unique values?

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

Correct Answer: A) SELECT DISTINCT

Step-by-step Solution: The DISTINCT keyword is used to return only distinct (different) values.

Practice Question 2

Can a Primary Key contain NULL values?

A) No, never
B) Yes, always
C) Yes, if allowed
D) Only if table is empty

Correct Answer: A) No, never

Step-by-step Solution: Primary keys have a strict NOT NULL constraint to ensure every row is uniquely identifiable.

Study Pro-Tip

DBMS index properties and normalizations are heavily tested in computer science rounds.