• Oracle functions


    1. ASCII returns the decimal number corresponding to the specified character; SQL> select ascii(‘A’) A,ascii(‘a’) a,ascii(‘0’) zero,ascii(‘ ‘) space from dual; A         A      ZERO     SPACE ——— ——— ——— ——— 65        97        48        32 2. Chr gives an integer and returns the corresponding character; SQL> select chr(54740) zhao,chr(65) chr65 from dual; ZH C — –Zhao a […]

  • Application and usage of instr() function in Oracle


    1. The format of instr() function Format 1: instr (string1, string2) / / instr (source string, target string) Format 2: instr (string1, string2 [, start_ position [, nth_ Appearance]] / / instr (source string, target string, start position, match sequence number) Resolution: to find the value of string2 in string1, it starts from start_ The […]

  • Detailed explanation of instr, NVL and substr functions in Oracle


    Usage of instr in Oracle: The format of instr method is Instr (source string, string to find, starting with the character, sequence number to find the match) Returns the location found, or 0 if not found For example:INSTR(‘CORPORATE FLOOR’,’OR’, 3, 2), source string is’CORPORATE FLOOR’, find ‘or’ in the string, find ‘or’ from the third […]

  • The performance of fuzzy query between like and instr in Oracle


    Instr (title, ‘manual’) > 0 is equivalent to title like ‘% manual%’ Instr (title, ‘manual’) = 1 is equivalent to title like ‘manual%’ Instr (title, ‘manual’) = 0 is equivalent to title not like ‘% manual%’ There are nearly 11 million data in the T table. Many times, we need to match strings. In SQL […]