why varchar takes 2 extra bytes?
Answers were Sorted based on User's Feedback
Answer / mirza baig
to store the exact no. of characters stored in the varchar
Is This Answer Correct ? | 7 Yes | 2 No |
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 |
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 |
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 |
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
How many sessions of MAX is PE capable of handling at a particular time?
How do you create a table with an existing structure of another table with data and with no data?
What are the different design perspectives used in teradata?
What are the different functions performed in development phase?
What are the commands to make a new table, change a table and remove a table in teradata?
How do you define Teradata?
What is the primary index in teradata?
What is bteq script in teradata?
why should we go Teradata over Oracle,what is the main differences?
Explain fastload in teradata?
Backup Script was blocked you are unable to archive the data now. how do you analyze it and where do you identify ?