Learn #SQL while tackling detective investigations
Write queries to learn about suspects, uncover evidence, and close the cases
Play at buff.ly/ANG0hA4
Learn #SQL while tackling detective investigations
Write queries to learn about suspects, uncover evidence, and close the cases
Play at buff.ly/ANG0hA4
Tables
Views
Indexes
Domains
These help document your objects
@martindba.bsky.social shows how to add them to view columns with
ALTER VIEW ... MODIFY (
Tables
Views
Indexes
Domains
These help document your objects
@martindba.bsky.social shows how to add them to view columns with
ALTER VIEW ... MODIFY (
Detect plan changes in #SQL queries
Identify which of these plans is best
Ensure future runs use the best plan
Prashant Dixit shows it in action
Detect plan changes in #SQL queries
Identify which of these plans is best
Ensure future runs use the best plan
Prashant Dixit shows it in action
CREATE PACKAGE BODY ... AS
...
BEGIN
do_stuff();
END;
Take care: this only runs when initializing the package
@petefinnigan.bsky.social shows how security checks here can fail
CREATE PACKAGE BODY ... AS
...
BEGIN
do_stuff();
END;
Take care: this only runs when initializing the package
@petefinnigan.bsky.social shows how security checks here can fail
Simple dot-notation -
JSON_VALUE ( column, '$.
Dot-notation returns NULL if it can't process the attribute,
JSON_VALUE gives full control over the behaviour
#SQL
Simple dot-notation -
JSON_VALUE ( column, '$.
Dot-notation returns NULL if it can't process the attribute,
JSON_VALUE gives full control over the behaviour
#SQL
Common ones are
COUNT, SUM, AVG, MAX, MIN
Baraa Khatib Salkini explains how these work and how to use them to answer questions like
How many orders are there?
What's their total sales value?
Common ones are
COUNT, SUM, AVG, MAX, MIN
Baraa Khatib Salkini explains how these work and how to use them to answer questions like
How many orders are there?
What's their total sales value?
@chrishoina.bsky.social shares an example prompt to store data about cars, trucks, motorcycles and their manufacturers
Then shows you how to use it with SQLcl MCP Server and Cline to make the tables
@chrishoina.bsky.social shares an example prompt to store data about cars, trucks, motorcycles and their manufacturers
Then shows you how to use it with SQLcl MCP Server and Cline to make the tables
Oracle AI Database 26ai EE for Linux x86-64 will be released on premises in the next RU (23.26.1), due January 2026
Read full details at blogs.oracle.com/database/ora...
Oracle AI Database 26ai EE for Linux x86-64 will be released on premises in the next RU (23.26.1), due January 2026
Read full details at blogs.oracle.com/database/ora...
Many of you have read my blog post from October during Oracle AI World in Las Vegas about Oracle AI Database 26ai replacing Oracle Database 23ai. But the main question remained: When is it available on-prem on…
Many of you have read my blog post from October during Oracle AI World in Las Vegas about Oracle AI Database 26ai replacing Oracle Database 23ai. But the main question remained: When is it available on-prem on…
Functions
Return a value
Can be called in #SQL - DML must be in an autonomous transaction
Procedures
Use OUT parameters to return values
Can't be called in SQL directly
Functions
Return a value
Can be called in #SQL - DML must be in an autonomous transaction
Procedures
Use OUT parameters to return values
Can't be called in SQL directly
For example, recording price fluctuations for goods
Alexey Makhotkin steps through designing tables to store these changes, proposing template tables with
Anchor
Value
Valid from/to dates
For example, recording price fluctuations for goods
Alexey Makhotkin steps through designing tables to store these changes, proposing template tables with
Anchor
Value
Valid from/to dates
ALTER TABLE ... MODIFY PARTITION BY ...
This can change
The partition method (RANGE/LIST/HASH)
The partition columns
Add/remove subpartitioning
Add the ONLINE clause to allow writes to continue while changing
ALTER TABLE ... MODIFY PARTITION BY ...
This can change
The partition method (RANGE/LIST/HASH)
The partition columns
Add/remove subpartitioning
Add the ONLINE clause to allow writes to continue while changing
Like puzzles?
Try #SQuizL
A free, daily guess-the-SQL statement quiz
You have up to six attempts to complete the statement on the top left using the fragments below
There's a new statement to guess at every day at midnight UTC
Play now at buff.ly/Myg8265
Like puzzles?
Try #SQuizL
A free, daily guess-the-SQL statement quiz
You have up to six attempts to complete the statement on the top left using the fragments below
There's a new statement to guess at every day at midnight UTC
Play now at buff.ly/Myg8265
@ludovico.bsky.social shows you how to do this to find images with semantic search
Loading an ONNX model & pictures
Creating PL/SQL to generate embeddings
Running this proc and searches on the standby
@ludovico.bsky.social shows you how to do this to find images with semantic search
Loading an ONNX model & pictures
Creating PL/SQL to generate embeddings
Running this proc and searches on the standby
If these are off by an order of magnitude or more, there's a good chance a different plan is faster
@tanelpoder.com has built scripts to show misestimates in Oracle plans
If these are off by an order of magnitude or more, there's a good chance a different plan is faster
@tanelpoder.com has built scripts to show misestimates in Oracle plans
QUALIFY clause
GraphQL Table Function for SQL
SQL Objects and Collections in MLE JavaScript
PL/SQL RESETTABLE clause to avoid ORA-04068: existing state of packages has been discarded
@gvenzl.bsky.social
QUALIFY clause
GraphQL Table Function for SQL
SQL Objects and Collections in MLE JavaScript
PL/SQL RESETTABLE clause to avoid ORA-04068: existing state of packages has been discarded
@gvenzl.bsky.social
CREATE USER ... NO AUTHENTICATION
=> you can't connect as this user
To run scripts as-if you're a schema-only account, use a proxy user
ALTER USER schema_only GRANT CONNECT THROUGH proxy
CONN proxy[schema_only]/<pwd>
CREATE USER ... NO AUTHENTICATION
=> you can't connect as this user
To run scripts as-if you're a schema-only account, use a proxy user
ALTER USER schema_only GRANT CONNECT THROUGH proxy
CONN proxy[schema_only]/<pwd>
e.g. the 3rd highest salary/department?
Number the values with
DENSE_RANK () OVER ( PARTITION BY ... ORDER BY ... DESC )
Then filter where the output of this is 3
Manish Sharma demos
e.g. the 3rd highest salary/department?
Number the values with
DENSE_RANK () OVER ( PARTITION BY ... ORDER BY ... DESC )
Then filter where the output of this is 3
Manish Sharma demos
@danischnider.bsky.social compares using
Hashes as CHAR(32) and RAW(16)
Sequences as NUMBER
And finds in Oracle #SQL
NUMBER is faster than RAW
RAW is faster than CHAR
@danischnider.bsky.social compares using
Hashes as CHAR(32) and RAW(16)
Sequences as NUMBER
And finds in Oracle #SQL
NUMBER is faster than RAW
RAW is faster than CHAR
@antikyte.bsky.social shows how to recover in Oracle AI Database when you accidentally remove data with
FLASHBACK TABLE ... TO
BEFORE DROP => restore a dropped table
TIMESTAMP => revert to a point in time
@antikyte.bsky.social shows how to recover in Oracle AI Database when you accidentally remove data with
FLASHBACK TABLE ... TO
BEFORE DROP => restore a dropped table
TIMESTAMP => revert to a point in time
But writing these can be fiddly
To help you with this, @zorantica.bsky.social has built
Data JAM for Oracle (Journaling & Auditing Module)
An #orclAPEX app to automate audt tables and triggers
Get it at
But writing these can be fiddly
To help you with this, @zorantica.bsky.social has built
Data JAM for Oracle (Journaling & Auditing Module)
An #orclAPEX app to automate audt tables and triggers
Get it at
EXCEPTION WHEN OTHERS THEN
Catches all errors
Filling your code with this without reraising the error hides unexpected issues
So the compiler raises PLW-6009 to warn you
If you reraise in custom logging procedures use
PRAGMA SUPPRESSES_WARNING_6009
To skip this warning
EXCEPTION WHEN OTHERS THEN
Catches all errors
Filling your code with this without reraising the error hides unexpected issues
So the compiler raises PLW-6009 to warn you
If you reraise in custom logging procedures use
PRAGMA SUPPRESSES_WARNING_6009
To skip this warning
This browser-based tool enables you to run and share #SQL statements
Even better, you can now connect to your schema from clients on your machine using SQL*Net
So you can run SQL from your favourite IDE
This browser-based tool enables you to run and share #SQL statements
Even better, you can now connect to your schema from clients on your machine using SQL*Net
So you can run SQL from your favourite IDE
See what was added with DBMS_UTILITY.EXPAND_SQL_TEXT
But this may expose sensitive values!
@connormcd.bsky.social shows how to hide them with contexts
See what was added with DBMS_UTILITY.EXPAND_SQL_TEXT
But this may expose sensitive values!
@connormcd.bsky.social shows how to hide them with contexts
@viniciusdba.com.br has built a script that analyzes AWR data to show
The 20 segments with the largest total size increases
A breakdown of the increase per month for each
Get it at
@viniciusdba.com.br has built a script that analyzes AWR data to show
The 20 segments with the largest total size increases
A breakdown of the increase per month for each
Get it at