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 - 7
SQL Analytics - 54
SQL General - 504
Oracle Text - 10
Data Models - 11
PL/SQL General - 484
Partitioning - 35
Compression - 1
SQL Types - 6
Oracle 12c - 12
Performance and Tuning - 21
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
1,255
280,381
9 years ago
Mike Hichwa (Oracle)
Script
HR Objects and Data For Live SQL
This script will create the HR Sample Schema objects and data in your local schema. If you want jus...
SQL, HR Schema, Employees Table, Departments Table
974
185,925
6.3 years ago
Oracle
Script
Baseball Teams and Players
Creates two tables: PLAYERS and TEAMS Teams are World Series teams from 2014: The Kansas City Roy...
122
9,872
9 years ago
Oracle
Script
Hello World
Simple example showing how to write text to the console.
DBMS_OUTPUT, pl/sql
99
7,294
9 years ago
Mike Hichwa (Oracle)
Script
Car Database
Database to perform Advanced DML, PL/SQL, Triggers, Procedure and Functions
89
5,812
7 years ago
Karan
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
190
5,025
9 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. Both statements m...
execution plan
67
3,709
9 years ago
Oracle
Script
Orders and Items Schema
Sample products, orders, and items schema with sample data.
Order Items, schema, data model, orders, items, customers, plsql
60
3,522
9 years ago
Mike Hichwa (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
32
2,212
8.9 years ago
Connor Mcdonald (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
89
1,848
8.1 years ago
Chris Saxon (Oracle)
Script
World Population Queries
Aggregation and various queries on shared world population schema data.
AGGREGATION, TOP-N, TOP-10, LEAD, RANK
66
1,685
9 years ago
Mike Hichwa (Oracle)
Script
Contacts Schema
Simple schema to use to practice SQL
36
1,384
9 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
96
1,339
8.4 years ago
Steven Feuerstein
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
38
1,272
4 years ago
Chris Saxon (Oracle)
Script
19C LISTAGG DISTINCT
The LISTAGG aggregate function now supports duplicate elimination by using the new DISTINCT keyword....
19c LISTAGG
51
1,104
5.7 years ago
Oracle
Script
Analytics - Ranking part 3
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
13
1,012
8.8 years ago
Connor Mcdonald (Oracle)
Script
Top N Query
Database 11g top N query syntax, Show top N rows of a query result
TOP-N, top
35
912
9 years ago
Mike Hichwa (Oracle)
Script
Oracle Database 11g SQL
Oracle Database 11g SQL Scripts Includes table customers,product_types,products,purchases,employees...
23
860
6.7 years ago
Ba Bunnki
Script
XML with EMP and DEPT
Basic XML casting example on the standard EMP and DEPT tables
XML, XMLForest
37
801
9 years ago
Mike Hichwa (Oracle)
Script
IS JSON
Using the is JSON where clause predicate
JSON, IS JSON, 12c
13
775
9 years ago
Mike Hichwa (Oracle)
Script
Analytics - More ranking options
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
18
739
8.8 years ago
Connor Mcdonald (Oracle)
Script
Analytics - More complex ranking functions
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
10
726
8.8 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
11
636
8.8 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
615
8.7 years ago
Steven Feuerstein
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
8
589
8.7 years ago
Connor Mcdonald (Oracle)
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
32
587
9 years ago
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
13
587
7.5 years ago
Connor Mcdonald (Oracle)
Script
ROW_NUMBER(), RANK(), DENSE_RANK() WITH EXAMPLE
ROW_NUMBER(), RANK(), DENSE_RANK() WITH EXAMPLE
20
547
7.1 years ago
SQL for Hierarchical Format
Script
DHBW Datenbanken Unit 1 - 10 - GROUP BY und HAVING
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
10
544
8 years ago
Matthias K. F. Schulz
Script
Function and Procedure in Package
A Test PLSQL Package that demonstrates both a Function and a Procedure.
32
519
9 years ago
Hemant K Chitale
Script
add 2 numbers using PL SQL
this is a program to add two numbers using PL/SQL commands.
5
515
6.7 years ago
Harneet Singh
Script
DHBW Datenbanken Unit 1 - 07 - Joins, 3 Tables (Artist, Album, Song)
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
11
496
8 years ago
Matthias K. F. Schulz
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
15
489
8.6 years ago
Connor Mcdonald (Oracle)
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
11
488
8.7 years ago
Connor Mcdonald (Oracle)
Script
PL/SQL case statement
PL/SQL case statement
PL/SQL case statement
8
455
7.7 years ago
PL/SQL case statement
Script
Employee and Department Salary Triggers
Script that updates the department's total salary column as employees are included, updated and dele...
employee department salary trigger funcionario departamento salario
13
441
6.5 years ago
gguuimaraes
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
6
426
8.8 years ago
Connor Mcdonald (Oracle)
Script
19c JSON_OBJECT
Syntax simplifications are offered for SQL/JSON path expressions, SQL/JSON generation with function ...
19c JSON
16
426
5.7 years ago
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...
16
418
9 years ago
Oracle
Script
Create Table-Exercise
Step1:Create AUTOPARTS table; Step2:Insert Values; Step3:View the AUTOPARTS table; Step4:Change P...
8
408
7.4 years ago
Michael Di Su
Script
DHBW Datenbanken Unit 1 - 04 - Operatoren
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
6
365
8 years ago
Matthias K. F. Schulz
Script
DHBW Datenbanken Unit 1 - 01 - SQL im Schnelldurchlauf
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
17
363
8.1 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
14
361
8.4 years ago
Steven Feuerstein
Script
DHBW Datenbanken Unit 1 - 12 - Subqueries
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
8
350
8 years ago
Matthias K. F. Schulz
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
6
343
8.6 years ago
Connor Mcdonald (Oracle)
Script
Brookstrut Sample Schema
Sample basic store, products, purchases schema with ability to generate data.
BROOKSTRUT, PL/SQL, PLSQL, SQL, data generation
14
342
9 years ago
Mike Hichwa (Oracle)
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
7
338
8.7 years ago
Connor Mcdonald (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
6
333
8.7 years ago
Connor Mcdonald (Oracle)
Script
Example Type
Customer Address type made up of a street address, postal code, city, state, country code.
type
6
331
9 years ago
Mike Hichwa (Oracle)
Script
DHBW Datenbanken Unit 1 - 16 - Constraints
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
10
322
8 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
5
320
8.5 years ago
Connor Mcdonald (Oracle)
Script
Row-Level Trigger
Creates a table of words and a trigger that strips leading and trailing blanks from each word that i...
10
312
9 years ago
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
7
308
8.6 years ago
Connor Mcdonald (Oracle)
Script
DHBW Datenbanken Unit 1 - 08 - Set Operatoren
DHBW Datenbanken Unit 1
DHBW, Datenbanken, Vorlesung
4
305
8 years ago
Matthias K. F. Schulz
Script
DHBW Datenbanken Unit 1 - 03 - AND, NOT und OR
DHBW Datenbanken Unit 1
7
304
8 years ago
Matthias K. F. Schulz
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
9
292
8.6 years ago
Steven Feuerstein
Script
Analytics - More window clause examples
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, windows, oracle, analytics
6
285
8.7 years ago
Connor Mcdonald (Oracle)
Script
How to Make Reusable SQL Pattern Matching Clauses with SQL Macros
An overview of how to combine SQL pattern matching with SQL macros to create reusable code fragments...
sql macro, match_recognize
18
283
4 years ago
Chris Saxon (Oracle)
Script
Analytics - Dynamically sized windows
SQL from the KISS (Keep It Simply SQL) Analytic video series by Developer Advocate Connor McDonald. ...
kiss, windows, oracle, analytics, dynamic
6
283
8.6 years ago
Connor Mcdonald (Oracle)
Script
Oracle Text Demo
Basic introduction to Oracle Text.
text
18
270
9 years ago
Joel Kallman (Oracle)
row(s) 1 - 60 of 1078
Next