Assign by calculation : CAST « Function « SQL / MySQL






Assign by calculation

       
mysql>
mysql> SET @PI = CAST(22 AS BINARY)/7;
Query OK, 0 rows affected (0.00 sec)

mysql>

   
    
    
    
    
    
    
  








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.Type Conversion (Cast)