Skip to content

LEADING

  • ‘character’: This parameter represents the leading characters that you want to remove from the ‘string’. It can be any valid character recognized by Oracle.
  • ‘string’: This parameter represents the original string from which you want to remove the leading characters specified in the ‘character’ parameter. It can be a string literal, variable, or column.
SELECT LEADING('0' FROM '00012345') AS TrimmedString
FROM dual;
TrimmedString
----------
12345

The LEADING function in Oracle SQL is used to remove specified characters from the beginning of a string. In this example, it is used to remove ‘0’ characters from the starting of the string ‘00012345’. Thus, the output is ‘12345’.