what is the basic diffrence betn a col declared in char(1)
and in varchar(1)

Answers were Sorted based on User's Feedback



what is the basic diffrence betn a col declared in char(1) and in varchar(1)..

Answer / nilam gandhi

char(1) is a fixed length character data,size character long.
Maximum size 2000 bytes.
Default size is 1 byte.
Varchar(1) is a variable length character string.
And the maximum size of the varchar(1) data type is 4000 bytes.

Is This Answer Correct ?    2 Yes 1 No

what is the basic diffrence betn a col declared in char(1) and in varchar(1)..

Answer / penchal das

Char is static in size where as Varchar is dynamic in size.

if we use char(15) and we have used only 10 charectes then remaining memory space will be wasted.

In case of Varchar(15) if use 10 chars remaining memory space will be freed.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What method is used by the Command classes to execute SQL statements that return single values?

0 Answers   B-Ways TecnoSoft,


plz send every query in sql server2000

1 Answers   Infosys,


What is database mirroring?

0 Answers  


What do you understand by user-defined function in the sql server?

0 Answers  


What is query optimizer in sql server?

0 Answers  






What is a trace frag? Where do we use it?

0 Answers  


What are the difference between primary keys and foreign keys?

0 Answers  


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

0 Answers   Global Logic,


Explain the difference between primary keys and foreign keys?

0 Answers  


How to automatically create a log when an exception is being received into SQL Server?

0 Answers   Cap Gemini,


What is a join and their types?

2 Answers   Challenger Financial,


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

0 Answers  


Categories