Skip to main content

Posts

Showing posts with the label instr

SUBSTR and INSTR Character Function in Oracle #DOTC_MDB

  Character Function SUBSTR and INSTR in Oracle   Hello Everyone , Today we will discuss about character Function SUBSTR and INSTR in Oracle SQL and its uses. In SQL Character Functions mainly operate on Character data , Character Function can be used with columns having character data.   SUBSTR :   SUBSTR functions allows you to extract a substring from a string. SUBSTR function returns a string value . If length is negative then SUBSTR function return a null value. Note:   If the position is positive, then Oracle Database counts from the beginning of char to find the first character. If the position is negative, then Oracle counts backward from the end of char Example of SUBSTR Function in Oracle SQL. To show uses of SUBSTR with different parameter I will take example from dual table and existing table in a database. To get the first 3 character we need to write below SQL query by using SUBSTR function to get the result. // GET FIRST 3 CHAR...