Day: March 4, 2019

Database
Oracle

INSTR examples in Oracle

Different uses of INSTR function in Oracle are shown here. Example-1: use of INSTR from the beginning of the string SELECT INSTR( ‘Eat to live, not live to eat’, ‘eat’ ) TEXT FROM dual; Output: Example-2: use of INSTR with positions and occurrence SELECT INSTR( ‘Eat to live, not live to eat’, ‘live’, 5, 2) […]

Read More
Database
Oracle

SUBSTR examples in Oracle

Different uses of SUBSTR function in Oracle are shown here. Example-1: use of SUBSTR without length SELECT SUBSTR( ‘Advanced Database Management System’, 9 ) TEXT FROM dual; Output: Example-2: use of SUBSTR with positive length SELECT SUBSTR( ‘Advanced Database Management System’, 9,8 ) TEXT FROM dual; Output: Example-3: use of SUBSTR with negative length SELECT […]

Read More
Database
Oracle

Oracle data types examples

This tutorial will help you to learn the uses of major data types in Oracle. Example-1: Use of char, varchar2 and Date data types Create a table named members that consists of 5 fields, acc_id, acc_name, acc_type, acc_nid, acc_create_date. acc_id and acc_nid char and other fields are varchar. CREATE TABLE members ( acc_id CHAR(10), acc_name VARCHAR2(50), acc_type VARCHAR2(7), […]

Read More