Multiple choice technology databases

When you use the DEFINE variable command, what datatype is the variable?

  1. VARCHAR2

  2. CHAR

  3. LONG

  4. NUMBER

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In SQL*Plus, the DEFINE command creates variables of CHAR datatype by default. These are fixed-length character variables that substitute values in SQL statements. DEFINE variables are not VARCHAR2 (variable-length), LONG (large text), or NUMBER (numeric). The CHAR datatype is used for substitution variables in SQL*Plus, though modern versions may handle them differently internally.