Type Conversion (Cast) : CAST « Function « SQL / MySQL






Type Conversion (Cast)

       

CAST(x AS type)                Changes x into the specified type. CAST works with the following types:
                               BINARY, CHAR, DATE, DATETIME, SIGNED [INTEGER], TIME, and UNSIGNED [INTEGER].
CONVERT(x, type)               Equivalent to CAST(x AS type).

   
    
    
    
    
    
    
  








Related examples in the same category

1.Converted a numeric value to the DATE conversion type.
2.Get the date of birth as one alphanumeric value.
3.Use the CAST( ) function
4.Cast value to signed integer
5.Cast birthday to char type
6.Cast null to char type
7.Assign by calculation