What is the default value of CHAR type?
Answers were Sorted based on User's Feedback
Answer / yash
The default value of a variable of value type is the value
assigned in the default constructor. For simple types this
value corresponds to a bit pattern of all zeros:
• For integer types, the default value is 0
• For char, the default value is `\u0000' //Unicode
• For float, the default value is 0.0f
• For double, the default value is 0.0d
• For decimal, the default value is 0.0m
• For bool, the default value is false
Is This Answer Correct ? | 26 Yes | 2 No |
Answer / mallesh
In Sybase the default value for Char is NULL
you can check it as
declare @val char(5)
select @val
o/p is NULL
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / samrat sen
In Sql Server 2000 the default value for char datatype is 10
Is This Answer Correct ? | 5 Yes | 6 No |
How to display a past time in days, hours and minutes?
What does COMMIT command do?
Where sql server usernames and passwords are stored in a sql server?
What is the recovery model? List the types of recovery model available in sql server?
What is correlated subquery in sql server?
Can we use Truncate command on a table which is referenced by FOREIGN KEY?
What happens if time-only values are provided as date and time literals?
What are logical database components? : SQL Server Architecture
select the 3rd maximum salary from sql server database if 4 (just an example In practically I may not know the exact situation) of the highest salaries are equal.
What options are available to audit login activity? : sql server security
how to avoid cursors? : Sql server database administration
what is a self join? Explain it with an example? : Sql server database administration