Which SQL statement creates a new base table (i.e., defines a table in the schema)?

Difficulty: Easy

Correct Answer: CREATE TABLE

Explanation:

Introduction / Context:Data Definition Language (DDL) statements create, alter, and drop database objects. Choosing the correct verb is essential for clear and portable SQL.

Given Data / Assumptions:

  • The goal is to define a brand-new table and its columns.
  • We are operating in standard SQL, not vendor-specific pseudo-syntax.
  • We distinguish CREATE from ALTER and other verbs.

Concept / Approach:CREATE TABLE defines a new table, its columns, data types, constraints, and optionally storage or partitioning options (vendor-specific). Other DDL statements modify existing objects (ALTER) or remove them (DROP).

Step-by-Step Solution:

Identify action: create new table → use CREATE TABLE.Exclude unrelated or nonstandard verbs.Confirm that column definitions and constraints follow in parentheses.

Verification / Alternative check:Consult any SQL reference: CREATE TABLE is the canonical statement for creating tables.

Why Other Options Are Wrong:ALTER TABLE: Modifies an existing table. MAKE/DEFINE/INIT TABLE: Not standard SQL keywords.

Common Pitfalls:Forgetting to declare primary keys, NOT NULL, and CHECK constraints at creation time can lead to data-quality issues.

Final Answer:CREATE TABLE

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion