What are the differences between Cast and Convert functions in SQL Server with T-SQL?

Possible duplicate:
T-SQL Cast versus Convert

What are the differences between Cast and Convert functions in SQL Server with T-SQL?

+3
source share
1 answer

Conversion is just a SQL server function, and Cast is more general (can be used in other dbms). Convert provides more flexibility than Cast. Therefore, if you are trying to choose which one to use, I would suggest that you have a specific reason to use Convert. As a suggestion,
 Dates, time: Convert
 Decimals, number: cast

+4
source

Source: https://habr.com/ru/post/1784831/


All Articles