SQLPlus metadata quick check: “You can check on the status or structure of tables with the DESCRIBE (DESC) command.” Determine whether this statement holds.

Difficulty: Easy

Correct Answer: Correct

Explanation:

Introduction / Context: SQLPlus provides utility commands to inspect objects quickly. DESCRIBE (or DESC) is commonly used to reveal a table or view’s columns and datatypes. This question evaluates whether DESC helps you check a table’s “status/structure.”

Given Data / Assumptions:

  • Using SQLPlus or compatible clients that support the DESCRIBE command.
  • Appropriate privileges to view metadata for the object in question.
  • “Status” in everyday practice often means understanding columns, types, nullability, and sometimes constraints through other dictionary views; DESC focuses on structure, not runtime health.

Concept / Approach: DESCRIBE table_name shows column names, datatypes, and NULL/NOT NULL information. Although DESC does not display indexes, constraints, or storage parameters, it is a quick structural check. For deeper inspection (for example, constraints, indexes), you query data dictionary views like USER_CONSTRAINTS, USER_INDEXES, and USER_TAB_COLUMNS. In that sense, DESC is indeed a valid way to “check on” the basic structure of a table within SQLPlus sessions.

Step-by-Step Solution:

Connect in SQLPlus and run: DESC emp;Review the listed columns, types, and nullability.Optionally query USER_TAB_COLUMNS for detailed metadata.Use data dictionary views for constraints and indexes as needed.

Verification / Alternative check: Compare DESC output with USER_TAB_COLUMNS to verify consistency; use SELECT * FROM dictionary views for full metadata coverage.

Why Other Options Are Wrong:

  • Limiting DESC to views or requiring AUTOTRACE is incorrect; DESC works for tables, views, synonyms (resolving to base objects), etc.
  • Object ownership affects privileges, not the command’s capability.

Common Pitfalls: Expecting DESC to show constraints, indexes, or statistics; confusing DESC with DBA_ dictionary queries.

Final Answer: Correct

Discussion & Comments

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