1.5k views

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. 20, 20
2. 3, 20
3. 3, 4
4. 20, 4
asked in Others | 1.5k views

The CHAR and VARCHAR types are similar, but differ in the way they are stored and retrieved. They also differ in maximum length and in whether trailing spaces are retained.

The CHAR and VARCHAR types are declared with a length that indicates the maximum number of characters you want to store. For example, CHAR(20) can hold up to 20 characters.

The length of a CHAR column is fixed to the length that you declare when you create the table.

VARCHAR(20) can also hold up to 20 characters... but if cahracter is less.. it will take less space...

so a needs 3 space (for ram)

b needs 20(for sita)

option 2

selected

1
+1 vote
2
–1 vote
3
4
5
6