Skip to Main Content
Oracle
Live SQL
Help
Sign In
Dark Mode
Home
Home
SQL Worksheet
SQL Worksheet
My Session
My Session
Previous Sessions
Previously Viewed
Utilization
NLS
Schema
Schema
Quick SQL
Quick SQL
My Models
My Scripts
My Scripts
My Tutorials
My Tutorials
Code Library
Code Library
Code Library
Breadcrumb
Search
Area
All
Oracle 19c - 6
SQL Analytics - 48
SQL General - 475
Oracle Text - 10
Data Models - 11
PL/SQL General - 474
Partitioning - 34
Compression - 1
SQL Types - 5
Oracle 12c - 12
Performance and Tuning - 20
Geospatial - 2
NLS - 8
Data Mining/Machine Learning - 1
Category
All
Types
All
Tutorials
Scripts
Sort By
Date Added
Executions
Name
Likes
Sort Order
Ascending
Descending
Results Per Page
60
120
180
240
300
360
420
480
540
600
Reset Search
Script
EMP and DEPT
Example EMP and DEPT tables. Classic Oracle tables with 4 departments and 14 employees. Includes a...
EMP, DEPT, JOIN, referential integrity
695
118,903
9.1 years ago
Mike Hichwa (Oracle)
Script
HR Objects and Data For Live SQL
This script will create a the HR Sample Schema objects and data in your local schema. If you want j...
SQL, HR Schema, Employees Table, Departments Table
398
61,587
6.4 years ago
Oracle
Script
Hello World
Simple example showing how to write text to the console.
DBMS_OUTPUT, pl/sql
76
6,200
9.1 years ago
Mike Hichwa (Oracle)
Script
Baseball Teams and Players
Creates two tables: PLAYERS and TEAMS Teams are World Series teams from 2014: The Kansas City Roy...
74
4,950
9.1 years ago
Oracle
Script
SQL Joins
SQL Join query examples, used to select rows from multiple tables using a join key.
SELF JOIN, OUTER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN
131
3,259
9.1 years ago
Mike Hichwa (Oracle)
Script
Simple Explain Plan
This script explains the plan for a query of the sh.sales and sh.products tables.
execution plan
44
2,600
9.1 years ago
Oracle
Script
Car Database
Database to perform Advanced DML, PL/SQL, Triggers, Procedure and Functions
40
2,283
7.1 years ago
Karan
Script
Orders and Items Schema
Sample products, orders, and items schema with sample data.
Order Items, schema, data model, orders, items, customers, plsql
41
2,138
9.1 years ago
Mike Hichwa (Oracle)
Script
World Population Queries
Aggregation and various queries on shared world population schema data.
AGGREGATION, TOP-N, TOP-10, LEAD, RANK
57
1,516
9.1 years ago
Mike Hichwa (Oracle)
Script
Pivot and unpivot examples using Olympic data
Examples of pivoting and unpivoting data. Uses a subset of the results from the Rio Olympics as a da...
pivot unpivot
63
1,382
8.2 years ago
Chris Saxon (Oracle)
Script
Analytics - Ranking rows across an entire table
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
ranking, kiss
19
1,270
9 years ago
Connor Mcdonald (Oracle)
Script
Contacts Schema
Simple schema to use to practice SQL
26
1,051
9.1 years ago
Mike Hichwa (Oracle)
Script
Top N Query
Database 11g top N query syntax, Show top N rows of a query result
TOP-N, top
24
737
9.1 years ago
Mike Hichwa (Oracle)
Script
Different Types of Cursors in PL/SQL
An exploration into the different ways you can define and use cursors (pointers to SQL result sets) ...
cursor
62
715
8.6 years ago
Steven Feuerstein (Oracle)
Script
IS JSON
Using the is JSON where clause predicate
JSON, IS JSON, 12c
11
684
9.1 years ago
Mike Hichwa (Oracle)
Script
XML with EMP and DEPT
Basic XML casting example on the standard EMP and DEPT tables
XML, XMLForest
32
642
9.1 years ago
Mike Hichwa (Oracle)
Script
Analytics - Ranking part 3
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
6
612
8.9 years ago
Connor Mcdonald (Oracle)
Script
''How did I get here?'' DBMS_UTILITY.FORMAT_CALL_STACK
Use the DBMS_UTILITY.FORMAT_CALL_STACK function to answer the question "How did I get here?". Note t...
call stack
22
579
8.8 years ago
Steven Feuerstein (Oracle)
Script
19C LISTAGG DISTINCT
The LISTAGG aggregate function now supports duplicate elimination by using the new DISTINCT keyword....
19c LISTAGG
32
573
5.9 years ago
Oracle
Script
Analytics - More complex ranking functions
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
7
433
8.9 years ago
Connor Mcdonald (Oracle)
Script
Analytics - More ranking options
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
9
425
9 years ago
Connor Mcdonald (Oracle)
Script
DHBW Datenbanken Unit 1 - 10 - GROUP BY und HAVING
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
8
412
8.2 years ago
Matthias K. F. Schulz
Script
19c JSON_OBJECT
Syntax simplifications are offered for SQL/JSON path expressions, SQL/JSON generation with function ...
19c JSON
14
386
5.9 years ago
Oracle
Script
ROW_NUMBER(), RANK(), DENSE_RANK() WITH EXAMPLE
ROW_NUMBER(), RANK(), DENSE_RANK() WITH EXAMPLE
11
377
7.2 years ago
SQL for Hierarchical Format
Script
DHBW Datenbanken Unit 1 - 07 - Joins, 3 Tables (Artist, Album, Song)
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
9
352
8.2 years ago
Matthias K. F. Schulz
Script
Brookstrut Sample Schema
Sample basic store, products, purchases schema with ability to generate data.
BROOKSTRUT, PL/SQL, PLSQL, SQL, data generation
14
333
9.1 years ago
Mike Hichwa (Oracle)
Script
Analytics - Using the PARTITION clause
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, partitioning, multi-column, range
6
332
7.7 years ago
Connor Mcdonald (Oracle)
Script
Analytics - How null values are treated
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
ranking, nulls, kiss
6
327
8.9 years ago
Connor Mcdonald (Oracle)
Script
Oracle Database 11g SQL
Oracle Database 11g SQL Scripts Includes table customers,product_types,products,purchases,employees...
9
317
6.8 years ago
Ba Bunnki
Script
Inserting Multiple Rows Using a Single Statement
This example creates three tables and them uses different INSERT statements to insert data into thes...
INSERT
25
307
9.1 years ago
Oracle
Script
DHBW Datenbanken Unit 1 - 04 - Operatoren
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
5
302
8.2 years ago
Matthias K. F. Schulz
Script
Analytics - First look at Window functions
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
ranking, kiss, oracle, sql, analytics
4
301
8.9 years ago
Connor Mcdonald (Oracle)
Script
Analytics - LAG and LEAD functions
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, windows, oracle, analytics, lag, lead
8
295
8.7 years ago
Connor Mcdonald (Oracle)
Script
Change-Logging Trigger
Creates a table, a log table, and a trigger that inserts a row in the log table after any row of the...
14
286
9.1 years ago
Oracle
Script
How to Find Gaps in Dates with SQL Pattern Matching
This shows you how to find gaps in rows containing start/end dates using match_recognize. You can ma...
match_recognize, SQL Macro
9
283
4.2 years ago
Chris Saxon (Oracle)
Script
DHBW Datenbanken Unit 1 - 01 - SQL im Schnelldurchlauf
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
10
283
8.2 years ago
Matthias K. F. Schulz
Script
Analytics - How to apply predicates
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
ranking, predicates, kiss
3
281
8.9 years ago
Connor Mcdonald (Oracle)
Script
DHBW Datenbanken Unit 1 - 12 - Subqueries
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
8
280
8.1 years ago
Matthias K. F. Schulz
Script
Function and Procedure in Package
A Test PLSQL Package that demonstrates both a Function and a Procedure.
20
267
9.1 years ago
Hemant K Chitale
Script
Analytics - Partition clause with aggregation
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
aggregation, kiss, partition
4
264
8.9 years ago
Connor Mcdonald (Oracle)
Script
Oracle Text Demo
Basic introduction to Oracle Text.
text
15
257
9.1 years ago
Joel Kallman (Oracle)
Script
Example Type
Customer Address type made up of a street address, postal code, city, state, country code.
type
4
251
9.1 years ago
Mike Hichwa (Oracle)
Script
DHBW Datenbanken Unit 1 - 08 - Set Operatoren
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
4
240
8.2 years ago
Matthias K. F. Schulz
Script
DHBW Datenbanken Unit 1 - 16 - Constraints
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
4
230
8.1 years ago
Matthias K. F. Schulz
Script
DHBW Datenbanken Unit 1 - 03 - AND, NOT und OR
DHBW Datenbanken Unit 1
5
227
8.2 years ago
Matthias K. F. Schulz
Script
DML Trigger Conditional Predicates: INSERTING, UPDATING, DELETING
The triggering event of a DML trigger can be composed of multiple triggering statements. When one of...
conditional predicate,inserting,updating,deleting
6
201
8.6 years ago
Steven Feuerstein (Oracle)
Script
Analytics - Window boundaries
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, windows, oracle, analytics, range
3
197
8.8 years ago
Connor Mcdonald (Oracle)
Script
DHBW Datenbanken Unit 1 - 05 - Joins v2
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
2
194
6.2 years ago
Matthias K. F. Schulz
Script
Analytics - The RANGE options for windows
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, windows, oracle, analytics, range
5
192
8.8 years ago
Connor Mcdonald (Oracle)
Script
Compute real-earth distances with SQL
This SQL script shows how to use the SDO_GEOM.SDO_DISTANCE function to calculate distances between t...
distance,sql,locator
9
191
9.1 years ago
Carsten Czarski (Oracle)
Script
Analytics - Windows and the NTH_VALUE function
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, windows, oracle, analytics, nth_value
5
191
8.8 years ago
Connor Mcdonald (Oracle)
Script
Exceptions Raised in Declaration Section Not Handled Locally
This sometimes surprises a developer new to PL/SQL. The exception section of a PL/SQL block can only...
exception,declaration,unhandled
8
190
8.7 years ago
Steven Feuerstein (Oracle)
Script
EXPLAIN PLAN
Use the EXPLAIN PLAN statement to determine the execution plan Oracle Database follows to execute a ...
EXPLAIN PLAN, performance, access path
19
190
9.1 years ago
Mike Hichwa (Oracle)
Script
Hierarchical Queries
Using connect by and connect by prior to perform hierarchical queries using a self referencing forei...
connect by, hierarchical query
12
187
9.1 years ago
Mike Hichwa (Oracle)
Script
Analytics - Windows and null values
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, windows, oracle, analytics, nulls
4
187
8.8 years ago
Connor Mcdonald (Oracle)
Script
MERGE example
This example creates item price table catalog1 to capture the price of various items. A second tab...
merge, WHEN MATCHED
16
185
9.1 years ago
Mike Hichwa (Oracle)
Script
Bitmap vs. B-tree Index Comparison
A comparison between single column B-tree vs. bitmap indexes.
index, bitmap
8
182
7.3 years ago
Chris Saxon (Oracle)
Script
DHBW Datenbanken Unit 1 - 15 - Tuning, Index, Statistics, Explain Plan
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
6
178
8.1 years ago
Matthias K. F. Schulz
Script
Analytics - Grouping ranges of data
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, oracle, analytics, grouping, ranges
4
174
8.6 years ago
Connor Mcdonald (Oracle)
Script
Function Result Cache Demo
Demonstrate the use and performance advantage of function result cache
Result cache PLSQL
15
171
9.1 years ago
Binuraj Somanathan Nair (http://oracleappsdiary.blogspot.co.uk)
row(s) 1 - 60 of 1036
Next