Beginner Level Inbuilt Functions
in Oracle Database
Focus on String and Date
Manipulation Functions
Training for Junior Developers
Introduction to Oracle Functions
• • Inbuilt functions simplify SQL queries
• • Useful for manipulating strings, numbers,
and dates
• • Improve efficiency and readability
• • Today: Focus on String and Date functions
String Functions Overview
• Common string functions:
• • UPPER(str) – Converts text to uppercase
• • LOWER(str) – Converts text to lowercase
• • INITCAP(str) – Capitalizes first letter of each
word
• • LENGTH(str) – Returns length of string
• • SUBSTR(str, start, length) – Extracts part of
string
• • INSTR(str, substring) – Finds position of
Examples of String Functions
• Example 1: UPPER
• SELECT UPPER('oracle') FROM dual; → ORACLE
• Example 2: SUBSTR
• SELECT SUBSTR('HelloWorld', 1, 5) FROM dual;
→ Hello
• Example 3: INSTR
• SELECT INSTR('HelloWorld','W') FROM dual; →
Date Functions Overview
• Common date functions:
• • SYSDATE – Current system date and time
• • ADD_MONTHS(date, n) – Add n months
• • MONTHS_BETWEEN(date1, date2) –
Difference in months
• • NEXT_DAY(date, 'DAY') – Next occurrence of
a weekday
• • LAST_DAY(date) – Last day of the month
• • ROUND(date, 'fmt') – Rounds date to
Examples of Date Functions
• Example 1: SYSDATE
• SELECT SYSDATE FROM dual; → 23-SEP-25
• Example 2: ADD_MONTHS
• SELECT ADD_MONTHS(SYSDATE, 2) FROM
dual;
• Example 3: MONTHS_BETWEEN
• SELECT MONTHS_BETWEEN('01-SEP-25','01-
Real World Use Cases
• • String functions – Cleaning and formatting
user data
• Example: Validating email addresses,
formatting names
• • Date functions – Calculating deadlines,
schedules
• Example: Finding due dates, last day of
billing cycle
Summary
• • Inbuilt functions save time and effort
• • String functions help with text manipulation
• • Date functions handle scheduling and time
logic
• • Practice with examples to master usage