What is difference between nchar and nvarchar?



What is difference between nchar and nvarchar?..

Answer / Santosh Kumar Bhagat

Both `nchar` and `nvarchar` are used for character data in SQL Server, but they have different fixed-length handling behaviors. `nchar` will always take up the specified number of bytes even if the string is shorter, whereas `nvarchar` only takes up the necessary amount of space when the string is shorter than its maximum length. For example, creating an `nchar(10)` column would always use 10 bytes, while creating an `nvarchar(10)` column would only use the actual number of bytes needed for the stored string.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What does over partition by mean in sql?

1 Answers  


What is rule base and cost base optimizer?

2 Answers   Thermotech,


How much does sql cost?

1 Answers  


How can triggers be used for the table auditing?

1 Answers  


What is microsoft t sql?

1 Answers  


What is an Integrity Constraint?

4 Answers  


What is difference between left and right outer join?

1 Answers  


Which normal form is best?

1 Answers  


What are pl/sql packages?

1 Answers  


Can we use ddl commands in pl sql?

1 Answers  


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1 Answers  


If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

1 Answers  


Categories