Skip to Main Content
Oracle
Live SQL
Help
Sign In
Home
SQL Worksheet
My Session
Previous Sessions
Utilization
NLS
Schema
Quick SQL
My Models
My Scripts
My Tutorials
Code Library
Code Library
Breadcrumb
Search
Area
All
Oracle 19c - 6
SQL Analytics - 48
SQL General - 470
Oracle Text - 10
Data Models - 11
PL/SQL General - 465
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
Results Per Page
60
120
180
240
300
360
420
480
540
600
Reset Search
EMP and DEPT
Example EMP and DEPT tables. Classic Oracle tables with 4 departments and 14 employees. Includes a...
Script
EMP, DEPT, JOIN, referential integrity
599
92,520
5.3 years ago
Mike Hichwa (Oracle)
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...
Script
SQL, HR Schema, Employees Table, Departments Table
290
48,768
2.6 years ago
Oracle
Hello World
Simple example showing how to write text to the console.
Script
DBMS_OUTPUT, pl/sql
70
5,913
5.3 years ago
Mike Hichwa (Oracle)
Baseball Teams and Players
Creates two tables: PLAYERS and TEAMS Teams are World Series teams from 2014: The Kansas City Roy...
Script
63
4,703
5.3 years ago
Oracle
SQL Joins
SQL Join query examples, used to select rows from multiple tables using a join key.
Script
SELF JOIN, OUTER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN
125
3,007
5.3 years ago
Mike Hichwa (Oracle)
Simple Explain Plan
This script explains the plan for a query of the sh.sales and sh.products tables.
Script
execution plan
39
2,293
5.3 years ago
Oracle
Car Database
Database to perform Advanced DML, PL/SQL, Triggers, Procedure and Functions
Script
36
2,137
3.3 years ago
Karan
Orders and Items Schema
Sample products, orders, and items schema with sample data.
Script
Order Items, schema, data model, orders, items, customers, plsql
41
2,003
5.3 years ago
Mike Hichwa (Oracle)
World Population Queries
Aggregation and various queries on shared world population schema data.
Script
AGGREGATION, TOP-N, TOP-10, LEAD, RANK
56
1,473
5.3 years ago
Mike Hichwa (Oracle)
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...
Script
pivot unpivot
58
1,263
4.4 years ago
Chris Saxon (Oracle)
Analytics - Ranking rows across an entire table
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
ranking, kiss
17
986
5.2 years ago
Connor Mcdonald (Oracle)
Contacts Schema
Simple schema to use to practice SQL
Script
25
977
5.3 years ago
Mike Hichwa (Oracle)
Top N Query
Database 11g top N query syntax, Show top N rows of a query result
Script
TOP-N, top
23
702
5.3 years ago
Mike Hichwa (Oracle)
IS JSON
Using the is JSON where clause predicate
Script
JSON, IS JSON, 12c
11
677
5.3 years ago
Mike Hichwa (Oracle)
Different Types of Cursors in PL/SQL
An exploration into the different ways you can define and use cursors (pointers to SQL result sets) ...
Script
cursor
59
634
4.7 years ago
Steven Feuerstein (Oracle)
XML with EMP and DEPT
Basic XML casting example on the standard EMP and DEPT tables
Script
XML, XMLForest
32
611
5.3 years ago
Mike Hichwa (Oracle)
''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...
Script
call stack
21
566
5 years ago
Steven Feuerstein (Oracle)
Analytics - Ranking part 3
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
5
493
5.1 years ago
Connor Mcdonald (Oracle)
19C LISTAGG DISTINCT
The LISTAGG aggregate function now supports duplicate elimination by using the new DISTINCT keyword....
Script
19c LISTAGG
28
473
2 years ago
Oracle
DHBW Datenbanken Unit 1 - 10 - GROUP BY und HAVING
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
8
400
4.3 years ago
Matthias K. F. Schulz
19c JSON_OBJECT
Syntax simplifications are offered for SQL/JSON path expressions, SQL/JSON generation with function ...
Script
19c JSON
13
371
2 years ago
Oracle
Analytics - More complex ranking functions
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
5
348
5.1 years ago
Connor Mcdonald (Oracle)
DHBW Datenbanken Unit 1 - 07 - Joins, 3 Tables (Artist, Album, Song)
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
9
346
4.3 years ago
Matthias K. F. Schulz
Brookstrut Sample Schema
Sample basic store, products, purchases schema with ability to generate data.
Script
BROOKSTRUT, PL/SQL, PLSQL, SQL, data generation
14
326
5.3 years ago
Mike Hichwa (Oracle)
ROW_NUMBER(), RANK(), DENSE_RANK() WITH EXAMPLE
ROW_NUMBER(), RANK(), DENSE_RANK() WITH EXAMPLE
Script
6
326
3.4 years ago
SQL for Hierarchical Format
Analytics - More ranking options
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
8
319
5.1 years ago
Connor Mcdonald (Oracle)
DHBW Datenbanken Unit 1 - 04 - Operatoren
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
5
300
4.3 years ago
Matthias K. F. Schulz
Inserting Multiple Rows Using a Single Statement
This example creates three tables and them uses different INSERT statements to insert data into thes...
Script
INSERT
24
282
5.3 years ago
Oracle
DHBW Datenbanken Unit 1 - 12 - Subqueries
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
8
280
4.3 years ago
Matthias K. F. Schulz
DHBW Datenbanken Unit 1 - 01 - SQL im Schnelldurchlauf
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
10
278
4.4 years ago
Matthias K. F. Schulz
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...
Script
12
267
5.3 years ago
Oracle
Analytics - How null values are treated
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
ranking, nulls, kiss
6
262
5.1 years ago
Connor Mcdonald (Oracle)
Oracle Database 11g SQL
Oracle Database 11g SQL Scripts Includes table customers,product_types,products,purchases,employees...
Script
8
256
3 years ago
Ba Bunnki
Oracle Text Demo
Basic introduction to Oracle Text.
Script
text
15
256
5.3 years ago
Joel Kallman (Oracle)
Analytics - How to apply predicates
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
ranking, predicates, kiss
3
241
5.1 years ago
Connor Mcdonald (Oracle)
DHBW Datenbanken Unit 1 - 08 - Set Operatoren
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
4
240
4.3 years ago
Matthias K. F. Schulz
Analytics - Using the PARTITION clause
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
kiss, partitioning, multi-column, range
4
238
3.8 years ago
Connor Mcdonald (Oracle)
Function and Procedure in Package
A Test PLSQL Package that demonstrates both a Function and a Procedure.
Script
18
233
5.3 years ago
Hemant K Chitale
Analytics - First look at Window functions
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
ranking, kiss, oracle, sql, analytics
3
232
5 years ago
Connor Mcdonald (Oracle)
Analytics - LAG and LEAD functions
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
kiss, windows, oracle, analytics, lag, lead
8
230
4.9 years ago
Connor Mcdonald (Oracle)
DHBW Datenbanken Unit 1 - 03 - AND, NOT und OR
DHBW Datenbanken Unit 1
Script
5
227
4.3 years ago
Matthias K. F. Schulz
Example Type
Customer Address type made up of a street address, postal code, city, state, country code.
Script
type
3
225
5.3 years ago
Mike Hichwa (Oracle)
DHBW Datenbanken Unit 1 - 16 - Constraints
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
4
224
4.3 years ago
Matthias K. F. Schulz
Analytics - Partition clause with aggregation
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
aggregation, kiss, partition
3
196
5 years ago
Connor Mcdonald (Oracle)
DHBW Datenbanken Unit 1 - 05 - Joins v2
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
2
193
2.4 years ago
Matthias K. F. Schulz
Compute real-earth distances with SQL
This SQL script shows how to use the SDO_GEOM.SDO_DISTANCE function to calculate distances between t...
Script
distance,sql,locator
9
185
5.3 years ago
Carsten Czarski (Oracle)
EXPLAIN PLAN
Use the EXPLAIN PLAN statement to determine the execution plan Oracle Database follows to execute a ...
Script
EXPLAIN PLAN, performance, access path
19
184
5.3 years ago
Mike Hichwa (Oracle)
DML Trigger Conditional Predicates: INSERTING, UPDATING, DELETING
The triggering event of a DML trigger can be composed of multiple triggering statements. When one of...
Script
conditional predicate,inserting,updating,deleting
4
180
4.7 years ago
Steven Feuerstein (Oracle)
DHBW Datenbanken Unit 1 - 15 - Tuning, Index, Statistics, Explain Plan
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
6
178
4.3 years ago
Matthias K. F. Schulz
Hierarchical Queries
Using connect by and connect by prior to perform hierarchical queries using a self referencing forei...
Script
connect by, hierarchical query
11
171
5.3 years ago
Mike Hichwa (Oracle)
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...
Script
exception,declaration,unhandled
8
169
4.9 years ago
Steven Feuerstein (Oracle)
Function Result Cache Demo
Demonstrate the use and performance advantage of function result cache
Script
Result cache PLSQL
15
169
5.2 years ago
Binuraj Somanathan Nair (http://oracleappsdiary.blogspot.co.uk)
DHBW Datenbanken Unit 1 - 14 - WITH Clause
DHBW, Datenbanken, Vorlesung
Script
3
168
4.3 years ago
Matthias K. F. Schulz
Bitmap vs. B-tree Index Comparison
A comparison between single column B-tree vs. bitmap indexes.
Script
index, bitmap
8
166
3.5 years ago
Chris Saxon (Oracle)
DHBW Datenbanken Unit 1 - 11 - DISTINCT
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
3
165
4.3 years ago
Matthias K. F. Schulz
DHBW Datenbanken Unit 1 - 13 - Views
DHBW Datenbanken Unit 1
Script
DHBW, Datenbanken, Vorlesung
6
158
4.3 years ago
Matthias K. F. Schulz
Analytics - The RANGE options for windows
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
kiss, windows, oracle, analytics, range
4
157
5 years ago
Connor Mcdonald (Oracle)
Interval Partitioning
Example of interval partitioning by date
Script
9
157
5.3 years ago
Mike Hichwa (Oracle)
Analytics - Window boundaries
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
Script
kiss, windows, oracle, analytics, range
3
154
5 years ago
Connor Mcdonald (Oracle)
Row-Level Trigger
Creates a table of words and a trigger that strips leading and trailing blanks from each word that i...
Script
6
154
5.3 years ago
Oracle
row(s) 1 - 60 of 1022
Next