what is the difference between char and varchar data types? : Sql dba



what is the difference between char and varchar data types? : Sql dba..

Answer / Husna Tabassum

The CHAR data type in SQL maintains a fixed length for each character field, even if the actual data stored is shorter. If the string is shorter than the specified length, it will be padded with spaces on the right side. On the other hand, the VARCHAR data type stores variable-length strings of up to a maximum size and does not pad spaces. This makes VARCHAR more space-efficient compared to CHAR.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What will you get by the cursor attribute sql%rowcount?

1 Answers  


How are sql commands classified?

1 Answers  


ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..

1 Answers   Wipro,


How does sql*loader handles newline characters in a record? : aql loader

1 Answers  


Where do we use pl sql?

1 Answers  


how to install mysql? : Sql dba

1 Answers  


What is pl sql collection?

1 Answers  


What is the difference between delete, truncate and drop command?

1 Answers  


Why coalesce is used in sql?

1 Answers  


HP Interview -2016 Unix 1) grep command in unix 2) what is set command

1 Answers   HCL,


What is record data type?

1 Answers  


what eliminate duplicate without using roenum and not

5 Answers   Matrix,


Categories