Both cast and covert serves the same purpose i.e. convert a data type to another.
- Cast
 
- Cast is ANSII Standard
 - Cast cannot be used for Formatting Purposes.
 - Cast cannot convert a datetime to specific format
 
- Convert
 
- Convert is Specific to SQL SERVER
 - Convert can be used for Formatting Purposes.For example Select convert (varchar, datetime, 101)
 - Convert can be used to convert a datetime to specific format
 
No comments:
Post a Comment