By Vinish Kapoor
Oracle SQL Tutorials
Every Oracle SQL tutorial on vinish.dev: queries, joins, analytics recipes, JSON, and 130+ SQL function guides, organized so you can find the one you need in seconds.
- 172 tutorials
- 9 topics
- 3 learning paths
- Updated October 2026
Browse by topic
Learning paths
Ordered series you can follow from the first lesson to the last.
SQL Essentials
Create a table, then query, change, and join data, step by step.
Start with: How to Create a Table in Oracle 23ai
All 15 lessons
- How to Create a Table in Oracle 23ai
- Understanding Data Types in Oracle Database 23ai
- How to Insert Data into a Table in Oracle 23ai
- How to Use SELECT Queries in Oracle Database 23ai
- How to Use WHERE Clause in Oracle Database 23ai Queries
- How to Use ORDER BY in Oracle Database 23ai Queries
- How to Use GROUP BY in Oracle Database 23ai
- Using UPDATE Statement in Oracle Database 23ai
- Using DELETE Statement in Oracle Database 23ai
- Using MERGE Statement in Oracle Database 23ai
- Oracle SQL INNER JOIN: Complete Guide to Matching Records Between Tables
- Oracle SQL Query to Use LEFT OUTER JOIN to Include All Records from Left Table
- Oracle SQL Query to Use Full Outer Join for Data Reconciliation
- Oracle SQL Query to Use EXPLAIN PLAN for Join Analysis
- Synonym in Oracle Database
Most-Used SQL Functions
The functions you will reach for every day: dates, text, numbers, NULL handling, and conversions.
Start with: Oracle TO_CHAR (Date) Function: A Simple Guide to Formatting Dates
All 19 lessons
- Oracle TO_CHAR (Date) Function: A Simple Guide to Formatting Dates
- Oracle TO_DATE Function: A Simple Guide to Converting Strings to Dates
- Oracle SYSDATE Function: A Simple Guide
- Oracle ADD_MONTHS Function: A Simple Guide
- Oracle MONTHS_BETWEEN Function: A Simple Guide
- Oracle TRUNC (Date) Function: A Simple Guide
- Oracle SUBSTR Function: A Simple Guide
- Oracle INSTR Function: A Simple Guide to Finding Substrings
- Oracle REPLACE Function: A Simple Guide
- Oracle TRIM Function: A Simple Guide
- Oracle REGEXP_REPLACE Function: A Simple Guide
- Oracle ROUND Function (Number): A Simple Guide
- Oracle NVL Function: A Simple Guide
- Oracle COALESCE Function: A Simple Guide
- Oracle DECODE Function: A Simple Guide
- Oracle TO_NUMBER Function: A Simple Guide
- Oracle CAST Function: A Simple Guide
- Oracle JSON_VALUE Function
- Oracle JSON_TABLE Function
SQL Query Recipes
Analytics patterns you can reuse: running totals, cohorts, churn, gaps and islands.
Start with: Oracle SQL Query to Calculate Business Days Excluding Holidays
All 12 lessons
- Oracle SQL Query to Calculate Business Days Excluding Holidays
- Oracle SQL Query to Find Overlapping Date Ranges
- Oracle SQL Query to Implement Cohort Analysis for Customer Retention
- Oracle SQL Query to Identify and Handle Duplicate Records
- Oracle SQL Query to Parse and Extract JSON Data with JSON_TABLE
- Oracle SQL Query to Calculate Churn Rate and Retention Metrics
- Oracle SQL Query to Perform ABC Analysis for Inventory Management
- Oracle SQL Query to Calculate Running Totals
- Oracle SQL Query to Find Gaps and Islands in Sequential Data
- Oracle SQL Query to Use LISTAGG for String Aggregation
- How to Convert Oracle Database Tables to JSON Format
- Oracle SQL Query to Implement Lead/Lag Analysis for Time Series Data
Latest tutorials
- Interview Prep & Books
Oracle Database 26ai SQL and PL/SQL Book
- SQL Basics & DML
Oracle SQL Developer Guide
- SQL Basics & DML
CREATE TABLE in Oracle with Auto Increment ID
- Interview Prep & Books
Tricky Oracle SQL Queries for Interview: Top Questions and Answers
- Interview Prep & Books
Top 50 Oracle SQL Interview Questions (2026 Edition)
- JSON in SQL
Oracle JSON_DATAGUIDE Function
- JSON in SQL
Oracle JSON_TRANSFORM Function
- JSON in SQL
Oracle JSON_SERIALIZE Function
Books & free tools
Go deeper with the books, or try the free tools.
- Book
Oracle Database 26ai SQL and PL/SQL
700 pages, 66 chapters, 677 examples with their real output, from first query to production PL/SQL.
- Free tool
SQL Formatter
Format and beautify SQL instantly in your browser, for Oracle, MySQL, PostgreSQL, T-SQL, and more.
- Free tool
CSV to SQL Insert Converter
Convert CSV data into SQL INSERT statements for Oracle, MySQL, PostgreSQL, or SQLite, with customization options.
- Free tool
Oracle SQL Script Browser
Explore SQL script files, extract the database objects in them, and view them in an interactive Oracle code viewer.
- Roadmap
Oracle Database Learning Roadmap
A structured path from SQL basics to advanced PL/SQL and database features. Tick off topics as you go.
- Book
AI Applications with Oracle Database 26ai and APEX 26.1
409 pages, 29 chapters, 237 examples: vectors, semantic search, RAG, and LLM calls from SQL and PL/SQL.
All tutorials by topic
SQL Basics & DML 14
SQL Developer, creating tables, SELECT, WHERE, GROUP BY, INSERT, UPDATE, DELETE, and MERGE.
Oracle SQL Developer Guide
If you work with Oracle databases, you need a reliable tool that makes querying, building, and managing your data feel effortless. Oracle SQL Developer is exactly that…
How to Create a Table in Oracle 23ai
Creating tables is the foundation of database development in Oracle. A table defines how your data will be structured, stored, and managed. In Oracle Database 23ai, the…
Understanding Data Types in Oracle Database 23ai
Every value stored in an Oracle Database must follow a data type. A data type defines what kind of data can be stored, how much space it takes, and what operations you…
How to Insert Data into a Table in Oracle 23ai
When you start working with Oracle Database 23ai, one of the first things you need to learn is how to add data into your tables. Inserting data is a basic yet powerful…
How to Use SELECT Queries in Oracle Database 23ai
Working with a database is all about getting useful information out of it. Oracle Database 23ai gives you a powerful way to do this with the SELECT statement. This…
How to Use WHERE Clause in Oracle Database 23ai Queries
The WHERE clause tells Oracle which rows to keep and which to skip. This tutorial shows practical ways to filter data using comparisons, ranges, pattern matching, NULL…
How to Use ORDER BY in Oracle Database 23ai Queries
The ORDER BY clause in Oracle Database 23ai lets you sort the rows returned by a query. Without it, the database can return results in any order. ORDER BY helps you…
How to Use GROUP BY in Oracle Database 23ai
The GROUP BY clause in Oracle Database 23ai is used when you want to organize rows into groups and then apply aggregate functions such as COUNT, SUM, AVG, MIN, or MAX.…
Using UPDATE Statement in Oracle Database 23ai
The UPDATE statement in Oracle Database 23ai is used to change existing data in a table. Instead of inserting new rows, UPDATE helps you adjust or fix information that…
Using DELETE Statement in Oracle Database 23ai
The DELETE statement in Oracle Database 23ai is used to remove existing rows from a table. Unlike DROP TABLE, which removes the entire table, DELETE only takes away…
Using MERGE Statement in Oracle Database 23ai
The MERGE statement in Oracle Database is a powerful command that combines the functionality of both INSERT and UPDATE. Instead of writing separate SQL commands, MERGE…
Synonym in Oracle Database
If you work with multiple schemas or long object names, synonyms in Oracle Database can make your SQL cleaner and your apps easier to maintain. A synonym is a friendly…
Oracle Create Table Examples
In Oracle SQL, the CREATE TABLE statement is used to define a new table in the database. A table consists of rows and columns, where each column has a specific data type…
CREATE TABLE in Oracle with Auto Increment ID
If you have worked with MySQL or SQL Server, you are probably used to AUTO_INCREMENT or IDENTITY columns that generate unique IDs automatically. Oracle does things a…
Joins & Query Recipes 14
Joins, execution plans, and analytics: running totals, cohorts, gaps and islands.
Oracle SQL INNER JOIN: Complete Guide to Matching Records Between Tables
Have you ever wondered how to efficiently retrieve data that exists in multiple related tables within your Oracle database? The INNER JOIN operation stands as one of the…
Oracle SQL Query to Use LEFT OUTER JOIN to Include All Records from Left Table
Are you finding it challenging to retrieve all records from your primary table while still including related data from secondary tables, even when no matches exist? The…
Oracle SQL Query to Use Full Outer Join for Data Reconciliation
Are you struggling to identify discrepancies and missing records when comparing data between different systems or databases? The FULL OUTER JOIN operation in Oracle SQL…
Oracle SQL Query to Use EXPLAIN PLAN for Join Analysis
The EXPLAIN PLAN statement in Oracle SQL provides detailed insights into how the database optimizer executes join operations, revealing the specific algorithms, access…
Oracle SQL Query to Calculate Business Days Excluding Holidays
How do you accurately calculate the number of working days between two dates while accounting for weekends and company holidays in Oracle SQL? This fundamental business…
Oracle SQL Query to Find Overlapping Date Ranges
Have you ever wondered how to identify when two or more date ranges overlap in your Oracle database? Whether you're managing employee schedules, booking systems, or…
Oracle SQL Query to Implement Cohort Analysis for Customer Retention
How do you measure customer loyalty and retention patterns across different time periods using Oracle SQL? Cohort analysis represents one of the most powerful techniques…
Oracle SQL Query to Identify and Handle Duplicate Records
Have you ever discovered that your database contains multiple identical records, causing data integrity issues and skewing your business reports? Duplicate records…
Oracle SQL Query to Calculate Churn Rate and Retention Metrics
Customer churn represents one of the most critical metrics for subscription-based businesses, SaaS companies, and any organization focused on customer retention.…
Oracle SQL Query to Perform ABC Analysis for Inventory Management
Inventory management often feels like solving a complex puzzle where you need to identify which products deserve your maximum attention and resources. ABC analysis…
Oracle SQL Query to Calculate Running Totals
Running totals, also known as cumulative sums, are essential for financial reporting, inventory tracking, and data analysis tasks where you need to see accumulated…
Oracle SQL Query to Find Gaps and Islands in Sequential Data
What exactly are gaps and islands when working with sequential data in Oracle databases? Gaps and islands represent a fundamental pattern recognition problem in SQL…
Oracle SQL Query to Use LISTAGG for String Aggregation
Have you ever needed to combine multiple row values into a single concatenated string in Oracle SQL? String aggregation is a common requirement in database reporting…
Oracle SQL Query to Implement Lead/Lag Analysis for Time Series Data
The LEAD and LAG analytical functions in Oracle SQL provide powerful capabilities for accessing data from subsequent or preceding rows within the same result set without…
JSON in SQL 14
JSON functions, JSON_TABLE, and generating JSON from tables.
How to Convert Oracle Database Tables to JSON Format
How do you convert traditional relational data into JSON format using Oracle SQL? JSON has become the de facto standard for data exchange in modern applications, and…
Oracle JSON Type Constructor
Important Prerequisite: The JSON type constructor is a modern feature. To use it, your database compatible parameter must be set to 20 or higher. If you are on an older…
Oracle JSON_ARRAY Function
The JSON_ARRAY function in Oracle SQL is a "constructor" function. Its job is the opposite of JSON_VALUE or JSON_QUERY. Instead of extracting data from JSON, JSON_ARRAY…
Oracle JSON_ARRAYAGG Function
The JSON_ARRAYAGG function in Oracle SQL is an aggregate function. Its job is to take all the values from a single column across multiple rows and combine (or…
Oracle JSON_DATAGUIDE Function
The JSON_DATAGUIDE function in Oracle SQL is a powerful aggregate function used for data analysis. Its job is not to extract data, but to analyze a collection of JSON…
Oracle JSON_OBJECT Function
The JSON_OBJECT function in Oracle SQL is a "constructor" function. Its job is the opposite of JSON_VALUE or JSON_QUERY. Instead of extracting data from JSON…
Oracle JSON_OBJECTAGG Function
The JSON_OBJECTAGG function in Oracle SQL is an aggregate function. Its job is to take all the rows in a group and combine them into a single JSON object. This is the…
Oracle JSON_QUERY Function
When working with JSON data in Oracle, you have two main functions for extracting data: JSON_VALUE and JSON_QUERY. This tutorial focuses on JSON_QUERY, which you use…
Oracle JSON_SCALAR Function
The JSON_SCALAR function in Oracle SQL is a constructor function that converts a single SQL scalar value (like a NUMBER, VARCHAR2, or DATE) into its equivalent JSON…
Oracle JSON_SERIALIZE Function
The JSON_SERIALIZE function in Oracle SQL is a conversion function that takes JSON data (stored as a JSON type, VARCHAR2, CLOB, or BLOB) and converts it back into a…
Oracle JSON_TABLE Function
The JSON_TABLE function in Oracle SQL is the most powerful and complex of Oracle's JSON functions. Its job is to "shred" a JSON document and present it as a regular…
Oracle JSON_TRANSFORM Function
The JSON_TRANSFORM function is Oracle's most powerful tool for modifying JSON data directly within a SQL query. While JSON_VALUE and JSON_QUERY are used to read data…
Oracle JSON_VALUE Function
When working with JSON data in Oracle, you have two main functions for extracting data: JSON_VALUE and JSON_QUERY. The difference is simple but critical: This tutorial…
Oracle SQL Query to Parse and Extract JSON Data with JSON_TABLE
Have you ever found yourself staring at a column full of JSON data in your Oracle database, wondering how to extract specific values without writing complex string…
String Functions 21
SUBSTR, INSTR, REPLACE, REGEXP, TRIM, LPAD, and every other character function.
A Simple Guide to the CHR Function in Oracle
If you've ever needed to use a special character in Oracle SQL, like a line break or a copyright symbol (©), the CHR function is the tool you need. This guide will…
How to Get Substring from a String in Oracle SQL?
In Oracle SQL, you get a substring from a string using the SUBSTR function. The SUBSTR function is one of the most versatile and commonly used string manipulation…
Oracle ASCII Function: A Simple Guide
The ASCII function in Oracle SQL is the reverse of the CHR function. It takes a character string and returns the numeric code (like ASCII, EBCDIC, etc.) for its very…
Oracle CONCAT Function: A Simple Guide to Joining Strings
When working with data in Oracle SQL, you'll often need to combine or "join" strings together. The CONCAT function is a built-in tool specifically for this purpose. This…
Oracle INITCAP Function: A Simple Guide to Capitalizing Words
When you have text data in your Oracle database that is messy—like all lowercase or all uppercase—it can look unprofessional in reports. The INITCAP function is a simple…
Oracle INSTR Function: A Simple Guide to Finding Substrings
Ever needed to find the exact position of a word or letter within a string in Oracle SQL? The INSTR function is the perfect tool for the job. This simple guide will…
Oracle LENGTH Function: A Simple Guide
The LENGTH function in Oracle SQL is one of the most fundamental string functions. It simply tells you the number of characters in a given string. It's an essential…
Oracle LOWER Function: A Simple Guide to Converting Text
When you're working with text data in an Oracle database, you'll often find that the capitalization is inconsistent. You might have 'Admin', 'admin', and 'ADMIN' all in…
Oracle LPAD Function: A Simple Guide to Left-Padding Strings
Have you ever needed to format your query results so they line up perfectly? For example, making all your ID numbers a fixed length (like 001, 023, 100)? The Oracle LPAD…
Oracle LTRIM Function: A Simple Guide to Trimming Characters
When working with data, you'll often find strings with unwanted characters at the beginning, especially leading spaces. The Oracle LTRIM function is a simple and…
Oracle REGEXP_REPLACE Function: A Simple Guide
When you need to find and replace text in Oracle, you might think of the REPLACE function. But what if you need to find a pattern, not just a fixed string? For this…
Oracle REGEXP_SUBSTR Function: A Simple Guide
While REGEXP_REPLACE is for changing text, what if you just want to extract text that matches a pattern? For this, Oracle provides the powerful REGEXP_SUBSTR function.…
Oracle REPLACE Function: A Simple Guide
When you need to do a simple "find and replace" on a string, the Oracle REPLACE function is the perfect tool for the job. Unlike REGEXP_REPLACE, which searches for…
Oracle RPAD Function: A Simple Guide
The RPAD function in Oracle is the mirror image of LPAD. It "Right Pads" a string, adding characters to the end of it until it reaches a specified total length. This…
Oracle RTRIM Function: A Simple Guide
The RTRIM function in Oracle is a powerful tool for cleaning data. It "Right Trims" a string, meaning it removes all specified characters from the end (or right side) of…
Oracle SOUNDEX Function: A Simple Guide
The SOUNDEX function in Oracle is a special phonetic tool that helps you find words that "sound alike" in English, even if they are spelled differently. It converts a…
Oracle SUBSTR Function: A Simple Guide
The SUBSTR function (short for "Substring") is one of the most powerful and commonly used string functions in Oracle SQL. It allows you to extract or "cut out" a…
Oracle TRANSLATE Function: A Simple Guide
The TRANSLATE function in Oracle SQL is a powerful tool for performing multiple, single-character substitutions all at once. It works like a find-and-replace for…
Oracle TRANSLATE USING Function: A Simple Guide
The TRANSLATE USING function in Oracle SQL is a specialized function used to convert a string from one character set to another. Specifically, it converts a string to…
Oracle TRIM Function: A Simple Guide
The TRIM function in Oracle SQL is a flexible and powerful tool for cleaning strings. It allows you to remove unwanted characters from the beginning (leading), the end…
Oracle UPPER Function: A Simple Guide
The UPPER function in Oracle SQL is a straightforward and widely used function that converts all letters in a string to uppercase. It's an essential tool for…
Numeric Functions 26
ROUND, TRUNC, MOD, CEIL, FLOOR, POWER, and the math functions.
Oracle ABS Function: A Simple Guide
The ABS function in Oracle SQL is a straightforward mathematical function. Its one and only job is to return the absolute value of a number. In simple terms, it makes…
Oracle ACOS Function: A Simple Guide
The ACOS function in Oracle SQL is a trigonometric function that stands for Arc Cosine. It does the opposite of the COS (Cosine) function. While COS takes an angle and…
Oracle ASIN Function: A Simple Guide
The ASIN function in Oracle SQL is a trigonometric function that stands for Arc Sine. It is the opposite of the SIN (Sine) function. While SIN takes an angle and gives…
Oracle ATAN Function: A Simple Guide
The ATAN function in Oracle SQL is a trigonometric function that stands for Arc Tangent. It is the opposite of the TAN (Tangent) function. While TAN takes an angle and…
Oracle ATAN2 Function: A Simple Guide
The ATAN2 function in Oracle SQL is a powerful trigonometric function. It's the "2-argument" version of the arc tangent. While ATAN(n) calculates the arc tangent of a…
Oracle BITAND Function: A Simple Guide
The BITAND function in Oracle SQL is a bitwise function. It compares two numbers (or numeric columns) on a bit-by-bit basis and returns a new number as the result of a…
Oracle CEIL Function: A Simple Guide
The CEIL function in Oracle SQL is a mathematical function that "rounds up" a number to the smallest integer that is greater than or equal to that number. The name CEIL…
Oracle COS Function: A Simple Guide
The COS function in Oracle SQL is a trigonometric function that returns the cosine of a given angle. It's important to remember that this function, like all…
Oracle COSH Function: A Simple Guide
The COSH function in Oracle SQL is a mathematical function that returns the hyperbolic cosine of a given number. This is a technical function used in engineering…
Oracle EXP Function: A Simple Guide
The EXP function in Oracle SQL is a mathematical function that returns the value of the constant e (approximately 2.71828183) raised to the power of a given number. This…
Oracle FLOOR Function: A Simple Guide
The FLOOR function in Oracle SQL is a mathematical function that returns the largest integer equal to or less than a given number. In simple terms, it always rounds a…
Oracle LN Function: A Simple Guide
The LN function in Oracle SQL is a mathematical function that returns the natural logarithm of a number. The natural logarithm is the logarithm to the base e, where e is…
Oracle LOG Function: A Simple Guide
The LOG function in Oracle SQL is a mathematical function that returns the logarithm of a number to a specific base. While the LN function is always base e, the LOG…
Oracle MOD Function: A Simple Guide
The MOD function in Oracle SQL is a mathematical function that returns the remainder of one number divided by another. It's also known as the "modulus" function. This…
Oracle NANVL Function: A Simple Guide
The NANVL function in Oracle SQL is a specialized function used to handle NaN (Not a Number) values. NaN is a special marker used in floating-point arithmetic…
Oracle POWER Function: A Simple Guide
The POWER function in Oracle SQL is a straightforward mathematical function that raises one number to the power of another number. This is the standard function to use…
Oracle REMAINDER Function: A Simple Guide
The REMAINDER function in Oracle SQL, like the MOD function, calculates the remainder of a division. However, it uses a different internal formula, which can lead to…
Oracle ROUND Function (Number): A Simple Guide
The ROUND function in Oracle SQL is one of the most common mathematical functions. It is used to round a number to a specified number of decimal places. You can use it…
Oracle SIGN Function: A Simple Guide
The SIGN function in Oracle SQL is a simple mathematical function that tells you the sign of a number. It doesn't return the number itself, but rather an indicator of…
Oracle SIN Function: A Simple Guide
The SIN function in Oracle SQL is a trigonometric function that calculates the sine of a given angle. The most important thing to remember is that the SIN function, like…
Oracle SINH Function: A Simple Guide
The SINH function in Oracle SQL is a mathematical function that returns the hyperbolic sine of a number. This is an exponential function used in engineering, physics…
Oracle SQRT Function: A Simple Guide
The SQRT function in Oracle SQL is a straightforward mathematical function that returns the square root of a given number. It's important to note that the SQRT function…
Oracle TAN Function: A Simple Guide
The TAN function in Oracle SQL is a trigonometric function that calculates the tangent of a given angle. Like all trigonometric functions in Oracle, TAN requires the…
Oracle TANH Function: A Simple Guide
The TANH function in Oracle SQL is a mathematical function that returns the hyperbolic tangent of a number. This is an exponential function, different from the standard…
Oracle TRUNC Function: A Simple Guide
The TRUNC function (for numbers) in Oracle SQL is a mathematical function that cuts off (truncates) a number to a specified number of decimal places. This is different…
Oracle WIDTH_BUCKET Function: A Simple Guide
The WIDTH_BUCKET function in Oracle SQL is a powerful analytical function that lets you group data into "buckets" of equal size. It's most commonly used to build…
Date & Time Functions 25
SYSDATE, ADD_MONTHS, MONTHS_BETWEEN, time zones, and date arithmetic.
Oracle ADD_MONTHS Function: A Simple Guide
Working with dates in SQL can be tricky, especially when you need to add or subtract months. Oracle provides a powerful and straightforward function for this exact task…
Oracle CEIL (Date) Function: A Simple Guide
The CEIL function in Oracle SQL can be used on numbers, but it also has a powerful version for DATE and TIMESTAMP values. In this context, CEIL "rounds up" a datetime…
Oracle CURRENT_DATE Function: A Simple Guide
The CURRENT_DATE function in Oracle SQL is a simple function that returns the current date and time based on your session's time zone. A common point of confusion is its…
Oracle CURRENT_TIMESTAMP Function: A Simple Guide
The CURRENT_TIMESTAMP function in Oracle SQL returns the exact current date, time, and time zone of your SQL session. Its key feature is that it returns a TIMESTAMP WITH…
Oracle DBTIMEZONE Function: A Simple Guide
The DBTIMEZONE function in Oracle SQL is a simple function that returns the time zone setting of the database itself. This is different from SESSIONTIMEZONE, which…
Oracle EXTRACT (Date/Time) Function: A Simple Guide
The EXTRACT function in Oracle SQL is a powerful tool for "pulling out" a single, specific part from a date or timestamp. Want just the YEAR from a DATE? Or the HOUR…
Oracle FLOOR (Date) Function: A Simple Guide
The FLOOR function in Oracle SQL can be used on numbers, but it also has a version for DATE and TIMESTAMP values. For dates, FLOOR "rounds down" the datetime to the unit…
Oracle FROM_TZ Function: A Simple Guide
The FROM_TZ function in Oracle SQL is a straightforward conversion function. Its one and only job is to convert a TIMESTAMP value (which has no time zone information)…
Oracle LAST_DAY Function: A Simple Guide
The LAST_DAY function in Oracle SQL is a very convenient datetime function that returns the date of the last day of the month for a given date. It's an essential tool…
Oracle LOCALTIMESTAMP Function: A Simple Guide
The LOCALTIMESTAMP function in Oracle SQL returns the current date and time (including fractional seconds) based on your session's time zone. The most important thing to…
Oracle MONTHS_BETWEEN Function: A Simple Guide
The MONTHS_BETWEEN function in Oracle SQL calculates the precise number of months between two dates. This function is essential for any business logic that involves…
Oracle NEW_TIME Function: A Simple Guide
The NEW_TIME function in Oracle SQL is a specific-purpose function used to convert a date and time from one time zone to another. Important Note: This is an older Oracle…
Oracle NEXT_DAY Function: A Simple Guide
The NEXT_DAY function in Oracle SQL is a handy date function that helps you find the date of the next specified day of the week. For example, if it's a Wednesday, you…
Oracle NUMTODSINTERVAL Function: A Simple Guide
When working with DATE or TIMESTAMP values in Oracle, you'll often need to add or subtract a specific duration, like "90 days" or "4 hours." While you can add days by…
Oracle NUMTOYMINTERVAL Function: A Simple Guide
When you need to perform date arithmetic in Oracle involving years or months, the NUMTOYMINTERVAL function is the right tool for the job. This function is the companion…
Oracle ORA_DST_AFFECTED Function: A Simple Guide
The ORA_DST_AFFECTED function in Oracle SQL is a highly specialized diagnostic tool used by Database Administrators (DBAs). This function is not used in regular…
Oracle ORA_DST_CONVERT Function: A Simple Guide
The ORA_DST_CONVERT function in Oracle SQL is a highly specialized tool used by Database Administrators (DBAs) during a database time zone file upgrade. This function is…
Oracle ORA_DST_ERROR Function: A Simple Guide
The ORA_DST_ERROR function in Oracle SQL is another highly specialized diagnostic tool used by Database Administrators (DBAs). It is part of the toolkit for managing…
Oracle ROUND (Date) Function: A Simple Guide
The ROUND function in Oracle SQL is not just for numbers; it's also a powerful tool for DATE and TIMESTAMP values. When used with dates, ROUND "rounds" a datetime value…
Oracle SESSIONTIMEZONE Function: A Simple Guide
The SESSIONTIMEZONE function in Oracle SQL is a simple function that returns the time zone of your current SQL session or connection. This is different from DBTIMEZONE…
Oracle SYS_EXTRACT_UTC Function: A Simple Guide
The SYS_EXTRACT_UTC function in Oracle SQL is a simple and powerful tool for standardizing time. Its one and only job is to convert a TIMESTAMP WITH TIME ZONE value into…
Oracle SYSDATE Function: A Simple Guide
The SYSDATE function is one of the most popular and frequently used functions in Oracle SQL. Its purpose is simple: it returns a single DATE value representing the…
Oracle SYSTIMESTAMP Function: A Simple Guide
The SYSTIMESTAMP function in Oracle SQL is the high-precision version of SYSDATE. It returns the exact current date, time (including fractional seconds), and time zone…
Oracle TRUNC (Date) Function: A Simple Guide
The TRUNC function (for dates) in Oracle SQL is one of the most important and frequently used date functions. It "truncates" or "cuts off" a DATE or TIMESTAMP value down…
Oracle TZ_OFFSET Function: A Simple Guide
The TZ_OFFSET function in Oracle SQL is a simple utility that returns the current time zone offset from UTC for a given time zone name. For example, it can tell you that…
Conversion Functions 40
TO_CHAR, TO_DATE, TO_NUMBER, CAST, and every conversion function.
Oracle ASCIISTR Function: A Simple Guide
The ASCIISTR function in Oracle SQL is a special-purpose utility that converts a string from any character set into a "safe" 7-bit ASCII representation. Its main purpose…
Oracle BIN_TO_NUM Function: A Simple Guide
The BIN_TO_NUM function in Oracle SQL is a mathematical function that converts a binary "bit vector" (represented as a list of 0s and 1s) into its equivalent decimal…
Oracle CAST Function: A Simple Guide
The CAST function in Oracle SQL is a powerful and standard way to convert a value from one data type to another. Think of it as a universal translator for your data. If…
Oracle CHARTOROWID Function: A Simple Guide
The CHARTOROWID function in Oracle SQL is a specialized conversion function. Its one and only job is to convert a string of text (like CHAR or VARCHAR2) that is…
Oracle COMPOSE Function: A Simple Guide
The COMPOSE function in Oracle SQL is a specialized Unicode function. Its job is to take a base character plus a "combining mark" (like an accent or an umlaut) and merge…
Oracle CONVERT Function: A Simple Guide
The CONVERT function in Oracle SQL is a specialized function used to convert a character string from one character set to another (e.g., from WE8ISO8859P1 to US7ASCII).…
Oracle DECOMPOSE Function: A Simple Guide
The DECOMPOSE function in Oracle SQL is a specialized Unicode function. It does the opposite of COMPOSE. Its job is to take a single, pre-composed character (like ö or…
Oracle HEXTORAW Function: A Simple Guide
The HEXTORAW function in Oracle SQL is a data type conversion function. Its one and only job is to convert a string of hexadecimal digits (like '4A', 'FF', '7D') into…
Oracle RAWTOHEX Function: A Simple Guide
The RAWTOHEX function in Oracle SQL is a data type conversion function. It is the direct opposite of HEXTORAW. Its one and only job is to take a RAW binary value and…
Oracle RAWTONHEX Function: A Simple Guide
The RAWTONHEX function in Oracle SQL is a character set-specific version of RAWTOHEX. Its job is to convert a RAW binary value into a human-readable hexadecimal string…
Oracle ROWIDTOCHAR Function: A Simple Guide
The ROWIDTOCHAR function in Oracle SQL is a simple conversion function. Its one and only job is to convert a ROWID data type into a human-readable text string…
Oracle ROWIDTONCHAR Function: A Simple Guide
The ROWIDTONCHAR function in Oracle SQL is a character set-specific version of ROWIDTOCHAR. Its one and only job is to convert a ROWID data type into a human-readable…
Oracle SCN_TO_TIMESTAMP Function: A Simple Guide
The SCN_TO_TIMESTAMP function in Oracle SQL is a special function used to find the approximate timestamp associated with a given System Change Number (SCN). An SCN is a…
Oracle TIMESTAMP_TO_SCN Function: A Simple Guide
The TIMESTAMP_TO_SCN function in Oracle SQL is a special function that does the exact opposite of SCN_TO_TIMESTAMP. It takes a TIMESTAMP value as an argument and returns…
Oracle TO_BINARY_DOUBLE Function: A Simple Guide
The TO_BINARY_DOUBLE function in Oracle SQL is a conversion function that changes a value (like a NUMBER or a VARCHAR2 string) into a double-precision floating-point…
Oracle TO_BINARY_FLOAT Function: A Simple Guide
The TO_BINARY_FLOAT function in Oracle SQL is a conversion function that changes a value (like a NUMBER or a VARCHAR2 string) into a single-precision floating-point…
Oracle TO_BLOB (bfile) Function: A Simple Guide
The TO_BLOB (bfile) function in Oracle SQL is a conversion function used to move data from an external file into the database. It reads a BFILE (a data type that points…
Oracle TO_BLOB (raw) Function: A Simple Guide
The TO_BLOB (raw) function in Oracle SQL is a conversion function that "upgrades" a RAW or LONG RAW data type into a BLOB (Binary Large Object). This is useful when you…
Oracle TO_CHAR (bfile|blob) Function: A Simple Guide
The TO_CHAR (bfile|blob) function in Oracle SQL is a special conversion function. Its job is to read binary data from a BFILE (an external file) or a BLOB (an internal…
Oracle TO_CHAR (character) Function: A Simple Guide
The TO_CHAR (character) function in Oracle SQL is a conversion function used to convert data from "large object" (CLOB, NCLOB) or "national character" (NCHAR, NVARCHAR2)…
Oracle TO_CHAR (Date) Function: A Simple Guide to Formatting Dates
The TO_CHAR function (when used with dates) is one of the most essential and commonly used functions in Oracle SQL. Its job is to take a DATE, TIMESTAMP, or INTERVAL and…
Oracle TO_CHAR (Number) Function: A Simple Guide to Formatting Numbers
The TO_CHAR function for numbers is one of the most important formatting functions in Oracle SQL. Its job is to take a NUMBER (or BINARY_FLOAT, BINARY_DOUBLE) and…
Oracle TO_CLOB (bfile|blob) Function: A Simple Guide
The TO_CLOB (bfile|blob) function in Oracle SQL is a conversion function. Its job is to take binary data, either from an external file (BFILE) or an internal binary…
Oracle TO_CLOB (character) Function: A Simple Guide
The TO_CLOB (character) function in Oracle SQL is a conversion function. Its primary job is to convert various character data types—specifically those in the national…
Oracle TO_DATE Function: A Simple Guide to Converting Strings to Dates
The TO_DATE function is one of the most essential and widely used functions in Oracle SQL. Its one and only job is to convert a text string (like '2025-01-30' or…
Oracle TO_DSINTERVAL Function: A Simple Guide
The TO_DSINTERVAL function in Oracle SQL is a conversion function that converts a text string (a CHAR or VARCHAR2) into an INTERVAL DAY TO SECOND data type. This…
Oracle TO_LOB Function: A Simple Guide
The TO_LOB function in Oracle SQL is a very specialized function used for data migration. Its one and only purpose is to convert old, deprecated LONG and LONG RAW data…
Oracle TO_MULTI_BYTE Function: A Simple Guide
The TO_MULTI_BYTE function in Oracle SQL is a specialized character set function. Its job is to convert single-byte (or "half-width") characters into their corresponding…
Oracle TO_NCHAR (character) Function: A Simple Guide
The TO_NCHAR (character) function in Oracle SQL is a conversion function. Its primary job is to convert various character data types (like CHAR, VARCHAR2, or CLOB) into…
Oracle TO_NCHAR (datetime) Function: A Simple Guide
The TO_NCHAR (datetime) function in Oracle SQL is a conversion function that formats DATE or TIMESTAMP values. It works almost identically to the standard…
Oracle TO_NCHAR (number) Function: A Simple Guide
The TO_NCHAR (number) function in Oracle SQL is a conversion function for formatting numbers. It works almost identically to the standard TO_CHAR(number) function, with…
Oracle TO_NCLOB Function: A Simple Guide
The TO_NCLOB function in Oracle SQL is a conversion function. Its primary job is to convert various character data types (like CHAR, VARCHAR2, or CLOB) into an NCLOB…
Oracle TO_NUMBER Function: A Simple Guide
The TO_NUMBER function in Oracle SQL is an essential conversion function. Its primary job is to convert a text string (like a VARCHAR2 or CHAR) into an actual NUMBER…
Oracle TO_SINGLE_BYTE Function: A Simple Guide
The TO_SINGLE_BYTE function in Oracle SQL is a specialized character set function. It is the direct opposite of TO_MULTI_BYTE. Its job is to convert multibyte (or…
Oracle TO_TIMESTAMP Function: A Simple Guide
The TO_TIMESTAMP function in Oracle SQL is a powerful conversion function. Its job is to take a text string (like '2025-01-20 15:30:00') and convert it into a TIMESTAMP…
Oracle TO_TIMESTAMP_TZ Function: A Simple Guide
The TO_TIMESTAMP_TZ function in Oracle SQL is a powerful conversion function. Its job is to take a text string (like '2025-11-20 10:30:00 -05:00') and convert it into a…
Oracle TO_YMINTERVAL Function: A Simple Guide
The TO_YMINTERVAL function in Oracle SQL is a conversion function that converts a text string (a CHAR or VARCHAR2) into an INTERVAL YEAR TO MONTH data type. This…
Oracle TREAT Function: A Simple Guide
The TREAT function in Oracle SQL is an advanced function used to change the declared type of an expression. It is most commonly used in two specific scenarios: This…
Oracle UNISTR Function: A Simple Guide
The UNISTR function in Oracle SQL is a powerful tool for creating text strings in the national character set. Its most important feature is its ability to create Unicode…
Oracle VALIDATE_CONVERSION Function: A Simple Guide to Safely Test Data
The VALIDATE_CONVERSION function in Oracle SQL is a powerful "safety check" function. Its one and only job is to test if a value (like a text string) can be successfully…
NULL, Comparison & Other Functions 15
NVL, COALESCE, DECODE, GREATEST, hashing, and LOB functions.
Oracle BFILENAME Function: A Simple Guide
The BFILENAME function in Oracle SQL is a special function used to work with external files. Its job is to create a BFILE locator, which is a pointer to a physical file…
Oracle COALESCE Function: A Simple Guide
The COALESCE function in Oracle SQL is a powerful and flexible function used to handle NULL values. Its job is to return the first non-NULL expression it finds in a list…
Oracle DECODE Function: A Simple Guide
The DECODE function in Oracle SQL is a powerful and concise way to write conditional logic (like an IF...THEN...ELSE statement) directly within your SQL query. It…
Oracle DUMP Function: A Simple Guide
The DUMP function in Oracle SQL is a powerful diagnostic tool. It's not used for normal reporting but is essential for debugging and internal analysis. Its purpose is to…
Oracle EMPTY_BLOB Function: A Simple Guide
The EMPTY_BLOB() function in Oracle SQL is a special function used to create an "empty" BLOB (Binary Large Object). This is a crucial first step when you want to add…
Oracle EMPTY_CLOB Function: A Simple Guide
The EMPTY_CLOB() function in Oracle SQL is a special function used to create an "empty" CLOB (Character Large Object). This is a crucial first step when you want to add…
Oracle GREATEST Function: A Simple Guide
The GREATEST function in Oracle SQL is a simple utility that looks at a list of values you provide and returns the one that is the largest. It's an incredibly useful…
Oracle LEAST Function: A Simple Guide
The LEAST function in Oracle SQL is the direct opposite of the GREATEST function. It looks at a list of values you provide and returns the one that is the smallest. It's…
Oracle LNNVL Function: A Simple Guide
The LNNVL function in Oracle SQL is a special logical function. Its name stands for "Logical Not NULL-Value Logic," and it's used to simplify conditions that involve…
Oracle NULLIF Function: A Simple Guide
The NULLIF function in Oracle SQL is a simple but powerful control-flow function. It compares two expressions. If they are equal, it returns NULL. If they are not equal…
Oracle NVL Function: A Simple Guide
The NVL function in Oracle SQL is one of the most common and essential functions for handling NULL values. A NULL value in a database means "unknown" or "empty," and it…
Oracle NVL2 Function: A Simple Guide
The NVL2 function in Oracle SQL is a powerful "if-then-else" function for handling NULL values. It's an extension of the basic NVL function. NVL2 checks an expression.…
Oracle ORA_HASH Function: A Simple Guide
The ORA_HASH function in Oracle SQL is a powerful function used to compute a consistent "hash value" (a number) for any given expression. Its main purpose is to help you…
Oracle STANDARD_HASH Function: A Simple Guide
The STANDARD_HASH function in Oracle SQL is a powerful security function. It computes a "hash value" (also known as a "fingerprint" or "checksum") for a given…
Oracle VSIZE Function: A Simple Guide
The VSIZE function in Oracle SQL is a simple utility function that tells you the number of bytes used to store a specific expression. This is different from the LENGTH…
Interview Prep & Books 3
SQL interview questions, tricky queries, and the SQL and PL/SQL book.
Oracle Database 26ai SQL and PL/SQL Book
700 pages, 66 chapters, 677 examples with their real output: SQL and PL/SQL on Oracle AI Database 26ai.
Tricky Oracle SQL Queries for Interview: Top Questions and Answers
Oracle SQL interviews do not just test whether you know the syntax. They test whether you can think through a problem and construct the right query under pressure.…
Top 50 Oracle SQL Interview Questions (2026 Edition)
Getting ready for an Oracle SQL interview can feel overwhelming, especially when the role covers everything from basic queries to advanced performance tuning. The good…
No tutorials match your search.
Try a shorter word, or search all of vinish.dev.
