cast to int code example
Example 1: sql cast
-- Specifically for Oracle
-- EXAMPLE
CAST('732.98' AS INT)
/* SYNTAX
CAST(<value_to_cast> AS <data_type_to_cast_to>)
*/
Example 2: sql cast to integer
-- NOTE: this is for SQL-Oracle specifically
/*
<...> : Your personal entry
*/
-- syntax:
CAST(<variable> as <variable-type>) -- in this case: <variable-type> = INTEGER
-- example:
SELECT CAST(MEMBER_NO as INTEGER)
FROM DUAL;
Example 3: java casting to int
//In java, you can cast to any primitive type by putting (primitiveType)
//before whatever you're casting to.
private static int myInt = (int)myDouble;