# What does SELECT cast do?

It's used to convert from one data type to another. It varies depending on the exact SQL version you're using, but sometimes certain types of implicit conversions can be made without explicit casting required.

Bron: [Can someone explain CAST() to me? : r/SQL - Reddit](https://www.reddit.com/r/SQL/comments/1bl3eja/can_someone_explain_cast_to_me/#:~:text=It's%20used%20to%20convert%20from%20one%20data%20type%20to%20another.&text=It%20varies%20depending%20on%20the,made%20without%20explicit%20casting%20required.)

Onderwerp: [Techniek & internet](https://1001vragen.nl/onderwerp/techniek-en-internet)
Toegevoegd: 2026-01-26
Webpagina: https://1001vragen.nl/vraag/what-does-select-cast-do

## What is select CAST in SQL?

CAST in SQL is a function to explicitly convert a value of one data type to another. As part of the SQL standard specification, it is available with the same syntax in different DBMS systems, including MySQL, SQL Server, PostgreSQL, and Oracle.

Bron: [SQL CAST Function: Everything You Need to Know - DbVisualizer](https://www.dbvis.com/thetable/sql-cast-function-everything-you-need-to-know/#:~:text=CAST%20in%20SQL%20is%20a,Server%2C%20PostgreSQL%2C%20and%20Oracle.)

## What is the use of CAST in Oracle SQL?

CAST lets you convert built-in data types or collection-typed values of one type into another built-in data type or collection type.

Bron: [CAST - Oracle Help Center](https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/CAST.html#:~:text=CAST%20lets%20you%20convert%20built,data%20type%20or%20collection%20type.)

## How do you convert varchar to int in SQL?

SQL server converts varchar to int type with the help of cast and convert functions. The varchar variable must contain numeric characters. SELECT CAST('77788' AS INT); SELECT CAST(CAST ('888.67' AS NUMERIC) AS INT).

Bron: [How sql server convert varchar to int? | JanBask Training Community](https://www.janbasktraining.com/community/sql-server/how-sql-server-convert-varchar-to-int#:~:text=SQL%20server%20converts%20varchar%20to,AS%20NUMERIC)%20AS%20INT).)

## Verwante vragen

- [How to write a cast statement in SQL?](https://1001vragen.nl/vraag/how-to-write-a-cast-statement-in-sql.md)
- [What is the CAST function in Oracle?](https://1001vragen.nl/vraag/what-is-the-cast-function-in-oracle.md)
- [How to use cast statement in SQL?](https://1001vragen.nl/vraag/how-to-use-cast-statement-in-sql.md)
- [How to cast a bit in SQL?](https://1001vragen.nl/vraag/how-to-cast-a-bit-in-sql.md)
- [How to use the CAST function in SQL?](https://1001vragen.nl/vraag/how-to-use-the-cast-function-in-sql.md)
- [What is the use of the cast() function in SQL?](https://1001vragen.nl/vraag/what-is-the-use-of-the-cast-function-in-sql.md)
- [How to cast a datatype in SQL?](https://1001vragen.nl/vraag/how-to-cast-a-datatype-in-sql.md)
- [How to use CAST function in Oracle?](https://1001vragen.nl/vraag/how-to-use-cast-function-in-oracle.md)
- [What is the cast method in SQL?](https://1001vragen.nl/vraag/what-is-the-cast-method-in-sql.md)
- [Which functions can be used to manipulate character number and date column values?](https://1001vragen.nl/vraag/which-functions-can-be-used-to-manipulate-character-number-and-date-column-values.md)
