The Cast usage of Oracle is often seen in the SQL of the predecessors, for example: www.2cto.com with t as (select level | ''l from dual connect by level <= 5), A (A, V) AS (select cast (l as varchar (30), 1 from tunion allselect a | L, V + 1 from a, t where instr (A, L) = 0 and v <5) SELECT * from a; for example, the with recursive statement above, but the CAST is used less often. Today, we will give ourselves A blind sweep, the description of CAST in the Oracle official document is as follows: CASTCAST converts values from one data type to another. return ValueThe data type specified Type_name.SyntaxCAST (expr AS type_name) Argumentsexpr can be an expression in one of the data types. type_name is one of the data types listed in Table1-2, "dimen1_data Types ". table 3-1 shows which data types can be cast into which other built-in data types. NUMBER between des NUMBER, DECIMAL, and INTEGER. DATETIME between des DATE, TIMESTAMP, timestamp with timezone, and TIMESTAMP WITH LOCAL TIMEZONE. INTERVAL between des interval day to second and interval year to month. table 3-1 Compatible Data TypesFrom To BINARY_FLOAT, BINARY_DOUBLE To CHAR, VARCHAR2 To NUMBER To DATETIME, INTERVAL To NCHAR, clerk, intervalnoyesnoyesnchar, comment ExampleCAST ('2017. 4567 'as NUMBER () retu Rns the value 123. 46. As described above, we can see that CAST can convert one type to another. For example, convert the string type to the NUMBER () type, not just the to_number, to_char (), and to_date () types, the preceding Table 3-1 indicates whether CAST can be used for mutual conversion of this type. Example call: ChenZw> select cast ('192. 100' as number (123) as num from dual;