Collections:
Convert Character Types to Numeric Types in Oracle
How To Convert Character Types to Numeric Types in Oracle?
✍: FYIcenter.com
You can convert character types to numeric types in two ways:
The sample script below shows you how to convert character types to numeric types:
PROCEDURE proc_convert_1 AS
start_time CHAR(5);
finish_time CHAR(5);
elapsed_time NUMBER(5);
BEGIN
start_time := '12052';
finish_time := '15314';
elapsed_time := TO_NUMBER(finish_time)
- TO_NUMBER(start_time);
elapsed_time := finish_time - start_time; -- same as above
END;
⇒ Types of Execution Flow Control Statements in Oracle
⇐ Scalar Data Types Supported in PL/SQL in Oracle
2018-11-17, 3100🔥, 0💬
Popular Posts:
What Happens If the UPDATE Subquery Returns Multiple Rows in MySQL? If a subquery is used in a UPDAT...
How To Start Instance with a Minimal Initialization Parameter File in Oracle? The sample initializat...
What Happens If the Imported Table Already Exists in Oracle? If the import process tries to import a...
How To Count Rows with the COUNT(*) Function in SQL Server? If you want to count the number of rows,...
How To Connect to a MySQL Server with a Port Number in MySQL? If you want to connect a MySQL server ...