Schema & DDL interview questions

27 Schema & DDL questions from the SQL bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

1. What is CREATE TABLE?

Junior
  1. A.a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  2. B.a DDL statement that defines a new relation by specifying its column names, data types, and constraints
  3. C.a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint
  4. D.a rule that validates each row against a boolean condition and rejects any row for which the condition is false

Answer + AI explanation with Pro

2. Which term means: "a DDL statement that defines a new relation by specifying its column names, data types, and constraints"?

Junior
  1. A.foreign key
  2. B.CHECK constraint
  3. C.CREATE TABLE
  4. D.SERIAL

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.CREATE TABLE — a column constraint that forbids the absence of a value, forcing every row to supply something for that column
  2. B.CREATE TABLE — a DDL statement that defines a new relation by specifying its column names, data types, and constraints
  3. C.CREATE TABLE — a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  4. D.CREATE TABLE — a column clause supplying a fallback value automatically used when an insert omits that column

Answer + AI explanation with Pro

4. What is ALTER TABLE?

Junior
  1. A.a column clause supplying a fallback value automatically used when an insert omits that column
  2. B.a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint
  3. C.a DDL statement that defines a new relation by specifying its column names, data types, and constraints
  4. D.a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines

Answer + AI explanation with Pro

5. Which term means: "a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint"?

Junior
  1. A.foreign key
  2. B.ALTER TABLE
  3. C.DEFAULT
  4. D.primary key

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.ALTER TABLE — a column constraint that forbids the absence of a value, forcing every row to supply something for that column
  2. B.ALTER TABLE — a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one
  3. C.ALTER TABLE — a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint
  4. D.ALTER TABLE — a DDL statement that defines a new relation by specifying its column names, data types, and constraints

Answer + AI explanation with Pro

7. What is primary key?

Junior
  1. A.a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  2. B.a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one
  3. C.a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  4. D.a rule that validates each row against a boolean condition and rejects any row for which the condition is false

Answer + AI explanation with Pro

8. Which term means: "a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one"?

Junior
  1. A.UNIQUE constraint
  2. B.NOT NULL
  3. C.SERIAL
  4. D.primary key

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.primary key — a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one
  2. B.primary key — a column clause supplying a fallback value automatically used when an insert omits that column
  3. C.primary key — a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint
  4. D.primary key — a column constraint that forbids the absence of a value, forcing every row to supply something for that column

Answer + AI explanation with Pro

10. What is foreign key?

Mid
  1. A.a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  2. B.a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table
  3. C.a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint
  4. D.a rule that validates each row against a boolean condition and rejects any row for which the condition is false

Answer + AI explanation with Pro

11. Which term means: "a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table"?

Mid
  1. A.DEFAULT
  2. B.primary key
  3. C.foreign key
  4. D.NOT NULL

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.foreign key — a column clause supplying a fallback value automatically used when an insert omits that column
  2. B.foreign key — a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table
  3. C.foreign key — a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint
  4. D.foreign key — a column constraint that forbids the absence of a value, forcing every row to supply something for that column

Answer + AI explanation with Pro

13. What is UNIQUE constraint?

Mid
  1. A.a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  2. B.a DDL statement that defines a new relation by specifying its column names, data types, and constraints
  3. C.a rule that validates each row against a boolean condition and rejects any row for which the condition is false
  4. D.a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one

Answer + AI explanation with Pro

14. Which term means: "a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines"?

Mid
  1. A.UNIQUE constraint
  2. B.CHECK constraint
  3. C.CREATE TABLE
  4. D.ALTER TABLE

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.UNIQUE constraint — a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  2. B.UNIQUE constraint — a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  3. C.UNIQUE constraint — a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table
  4. D.UNIQUE constraint — a column clause supplying a fallback value automatically used when an insert omits that column

Answer + AI explanation with Pro

16. What is CHECK constraint?

Mid
  1. A.a rule that validates each row against a boolean condition and rejects any row for which the condition is false
  2. B.a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one
  3. C.a column clause supplying a fallback value automatically used when an insert omits that column
  4. D.a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table

Answer + AI explanation with Pro

17. Which term means: "a rule that validates each row against a boolean condition and rejects any row for which the condition is false"?

Mid
  1. A.foreign key
  2. B.CHECK constraint
  3. C.NOT NULL
  4. D.DEFAULT

Answer + AI explanation with Pro

18. Which statement is correct?

Mid
  1. A.CHECK constraint — a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  2. B.CHECK constraint — a rule that validates each row against a boolean condition and rejects any row for which the condition is false
  3. C.CHECK constraint — a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  4. D.CHECK constraint — a column clause supplying a fallback value automatically used when an insert omits that column

Answer + AI explanation with Pro

19. What is NOT NULL?

Junior
  1. A.a column constraint that forbids the absence of a value, forcing every row to supply something for that column
  2. B.a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  3. C.a DDL statement that defines a new relation by specifying its column names, data types, and constraints
  4. D.a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table

Answer + AI explanation with Pro

20. Which term means: "a column constraint that forbids the absence of a value, forcing every row to supply something for that column"?

Junior
  1. A.NOT NULL
  2. B.ALTER TABLE
  3. C.primary key
  4. D.SERIAL

Answer + AI explanation with Pro

21. Which statement is correct?

Junior
  1. A.NOT NULL — a column constraint that forbids the absence of a value, forcing every row to supply something for that column
  2. B.NOT NULL — a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  3. C.NOT NULL — a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  4. D.NOT NULL — a rule that validates each row against a boolean condition and rejects any row for which the condition is false

Answer + AI explanation with Pro

22. What is DEFAULT?

Mid
  1. A.a DDL statement that defines a new relation by specifying its column names, data types, and constraints
  2. B.a column clause supplying a fallback value automatically used when an insert omits that column
  3. C.a column constraint that forbids the absence of a value, forcing every row to supply something for that column
  4. D.a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table

Answer + AI explanation with Pro

23. Which term means: "a column clause supplying a fallback value automatically used when an insert omits that column"?

Mid
  1. A.DEFAULT
  2. B.primary key
  3. C.CHECK constraint
  4. D.SERIAL

Answer + AI explanation with Pro

24. Which statement is correct?

Mid
  1. A.DEFAULT — a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint
  2. B.DEFAULT — a rule guaranteeing no two rows share the same value in the specified column(s), while still permitting NULLs in most engines
  3. C.DEFAULT — a DDL statement that defines a new relation by specifying its column names, data types, and constraints
  4. D.DEFAULT — a column clause supplying a fallback value automatically used when an insert omits that column

Answer + AI explanation with Pro

25. What is SERIAL?

Senior
  1. A.a column constraint that forbids the absence of a value, forcing every row to supply something for that column
  2. B.a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  3. C.a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one
  4. D.a constraint enforcing referential integrity by requiring a column's values to match an existing key in another (or the same) table

Answer + AI explanation with Pro

26. Which term means: "a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns"?

Senior
  1. A.SERIAL
  2. B.DEFAULT
  3. C.foreign key
  4. D.CHECK constraint

Answer + AI explanation with Pro

27. Which statement is correct?

Senior
  1. A.SERIAL — a column clause supplying a fallback value automatically used when an insert omits that column
  2. B.SERIAL — a Postgres pseudo-type that auto-generates increasing integer keys, equivalent in purpose to MySQL AUTO_INCREMENT and standard IDENTITY columns
  3. C.SERIAL — a constraint identifying each row uniquely; it forbids duplicate values and forbids NULLs, and a table may have only one
  4. D.SERIAL — a DDL statement that changes an existing table's structure, such as adding a column, dropping a column, or modifying a constraint

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Schema & DDL question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers