About 859,000 results
Open links in new tab
  1. CAST and CONVERT (Transact-SQL) - SQL Server | Microsoft Learn

    Reference for the CAST and CONVERT Transact-SQL functions. These functions convert expressions from one data type to another.

  2. SQL Server CAST () Function - W3Schools

    Aug 25, 2017 · Definition and Usage The CAST () function converts a value (of any type) into a specified datatype. Tip: Also look at the CONVERT () function. Syntax CAST (expression AS datatype (length))

  3. SQL CAST Function for Data Type Conversions

    May 25, 2021 · What is the SQL CAST Function? The short answer: The SQL CAST function is used to explicitly convert a given data type to a different data type in a SQL database. Although, there are …

  4. SQL CAST() Function: An Overview - LearnSQL.com

    Dec 3, 2024 · To achieve this, we need to extract the first three digits of the department. We need to convert this INT value to a VARCHAR value, then use the string function LEFT() to retrieve the first …

  5. SQL CAST Function in SQL Server – Syntax, Examples, and Best Practices

    Mar 31, 2025 · To avoid these pitfalls, the CAST function in SQL can be your failsafe. Unlike implicit conversions that occur automatically based on SQL Server’s type precedence rules, CAST() offers …

  6. SQL Server CAST () Function - GeeksforGeeks

    Jul 23, 2025 · CAST () function convert the integer value 1 to a bit data type. The CAST () function in SQL Server is a versatile tool for data transformation tasks. By understanding its usage and syntax, …

    Missing:
    • t sql
    Must include:
  7. T-SQL CAST function example and syntax

    T-SQL CAST function convert an expression of one data type to another.

  8. When to Use CONVERT () vs CAST () for Date Formatting in SQL Server

    Aug 6, 2025 · When formatting dates in SQL Server you may be wondering whether to use CONVERT() or CAST(). After all, both functions allow us to convert between data types. Let’s take a look at at …

  9. SQL Server CAST Function By Practical Examples

    Mar 14, 2019 · In this tutorial, you will learn how to use the SQL Server CAST () function to convert a value or an expression from one type to another.

  10. SQL Server: CAST Function - TechOnTheNet

    This SQL Server tutorial explains how to use the CAST function in SQL Server (Transact-SQL) with syntax and examples. In SQL Server (Transact-SQL), the CAST function converts an expression …