UGC-NET Jan 2017 · ER-Model

MCQ · 2 marks · Problem DBMS-RELM-0037

An attribute $A$ of datatype varchar $(20)$ has value 'Ram' and the attribute $B$ of datatype char $(20)$ has value 'Sita' in oracle. The attribute $A$ has memory spaces and $B$ has memory spaces.
  1. A
    $20,20$
  2. B
    $3,20$
  3. C
    $3,4$
  4. D
    $20,4$

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionVARCHAR(20) is variable length and stores only the characters actually present: 'Ram' takes 3 bytes, plus a small length prefix not counted here. CHAR(20) is fixed length and blank-pads every value to 20: 'Sita' takes 20.Answer: B

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com