why varchar takes 2 extra bytes?

Answers were Sorted based on User's Feedback



why varchar takes 2 extra bytes?..

Answer / mirza baig

to store the exact no. of characters stored in the varchar

Is This Answer Correct ?    7 Yes 2 No

why varchar takes 2 extra bytes?..

Answer / yuvaevergreen

to store the length of the data in the variable..
>>when char is used, spaces are padded to the length of the
vraiable.
>>In varchar, spaces are not padded, exact data alone is
stored along with the length.

Is This Answer Correct ?    5 Yes 0 No

why varchar takes 2 extra bytes?..

Answer / quesanswer

Each VARCHAR has two extra bytes reserved for it. One bite
for the preceding NULL indicator and one trailing byte
because VARCHAR is implemented as a ZSTRING.

Is This Answer Correct ?    2 Yes 0 No

why varchar takes 2 extra bytes?..

Answer / kallol

The two bytes are for the number of bytes for the binary
length of the field

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Teradata Interview Questions

i have a table like sales....the field are Prodid Jan(jam month sales)Feb March apr may jun july 1 20 76 50 74 94 93 83 2 30 94 40 94 93 93 02 3 40 90 30 49 94 92 56 4 70 20 30 93 46 35 78 5 23 40 40 39 84 46 57 6 85 30 55 93 46 46 46 7 84 20 65 83 56 57 57 8 10 93 40 93 68 57 36 9 57 30 30 83 67 57 79 10 38 83 40 83 55 68 47 11 35 39 90 94 57 78 47 12 83 89 50 93 79 69 69 i wat ti find the max sales of every product which i want to load into target table

6 Answers   Satyam,


How many sessions of MAX is PE capable of handling at a particular time?

0 Answers  


How do you create a table with an existing structure of another table with data and with no data?

1 Answers  


What are the different design perspectives used in teradata?

0 Answers  


What are the different functions performed in development phase?

0 Answers  






What are the commands to make a new table, change a table and remove a table in teradata?

0 Answers  


How do you define Teradata?

0 Answers  


What is the primary index in teradata?

0 Answers  


What is bteq script in teradata?

0 Answers  


why should we go Teradata over Oracle,what is the main differences?

4 Answers   TCS,


Explain fastload in teradata?

0 Answers  


Backup Script was blocked you are unable to archive the data now. how do you analyze it and where do you identify ?

0 Answers  


Categories