An attribute A of data type varchar (20) has value 'Ram' and the attribute B of data type char (20) has value 'Sita' in oracle. The attribute A has ______…
An attribute A of data type varchar (20) has value 'Ram' and the attribute B of data type char (20) has value 'Sita' in oracle. The attribute A has ______ memory spaces and B has ______ memory spaces.
Show answerHide answer
Correct answer: (B) 3, 20
Explanation
CHAR and VARCHAR are both declared with a maximum length, but a CHAR column is fixed to the declared length (padded with spaces), while VARCHAR(20) uses only as much space as the stored value. So A ('Ram') needs 3 spaces and B ('Sita') needs 20.