• Skip to primary navigation
  • Skip to main content

Tech Honey

The #1 Website for Oracle PL/SQL, OA Framework and HTML

  • Home
  • HTML
    • Tags in HTML
    • HTML Attributes
  • OA Framework
    • Item in OAF
    • Regions in OAF
    • General OAF Topics
  • Oracle
    • statement
    • function
    • clause
    • plsql
    • sql
You are here: Home / Oracle / function / LTRIM Function in Oracle SQL – PLSQL

LTRIM Function in Oracle SQL – PLSQL

November 26, 2012 by techhoneyadmin

The LTRIM Function in Oracle SQL / PLSQL is used to remove the specified characters in a string from the left side.

Syntax for the using the LTRIM Function in Oracle SQL / PLSQL is:

SELECT LTRIM(string_1,[string_2])
FROM table_name;

  • string_1 is the string which will be trimmed from the left side
  • string_2 is the string which will be matched in string_1 for trimming, it’s an optional parameter, if omitted then LTRIM function will remove all the spaces in string_1from left side.

Examples:
Using LTRIM Function in Oracle SQL / PLSQL SELECT statement:

SELECT LTRIM('Tech Honey', 'T')
FROM dual;

Will return ‘ech Honey’

SELECT LTRIM('Tech Honey', 'Tech')
FROM dual;

Will return ‘Honey’

SELECT LTRIM(' Tech Honey')
FROM dual;

Will return ‘Tech Honey’

SELECT LTRIM('56789Tech Honey', '0123456789')
FROM dual;

Will return ‘Tech Honey’

SELECT LTRIM('111111Tech Honey', '1')
FROM dual;

Will return ‘Tech Honey’


Filed Under: function Tagged With: how to use LTRIM Function in oracle database query, how to use LTRIM Function in oracle plsql, how to use LTRIM Function in oracle sql, LTRIM Function in oracle plsql, LTRIM Function in oracle sql, LTRIMPLSQL, syntax and example of LTRIM Function in oracle database query, syntax and example of LTRIM Function in oracle plsql, syntax and example of LTRIM Function in oracle sql, using LTRIM Function in oracle database query, using LTRIM Function in oracle plsql, using LTRIM Function in oracle sql

Copyright © 2023 · Parallax Pro on Genesis Framework · WordPress · Log in