SQL Assertions

SQL Assertions

Writing this article is something I have wanted to do for decades. Since the SQL-92 standard, “Assertions” have existed, but no database engine had implemented them until now. We could define a SQL Assertion as an advanced constraint that allows cross-checking across...
Not by AI, nor without.

Not by AI, nor without.

Note: If this article seems too long to you, ask an AI to summarize it. Then, if you want, read it and you’ll see what you missed. II have a friend who worked for many years at one of Spain’s leading publishing houses. As she told me, there isn’t a book that...
FLIGHTS open dataset.

FLIGHTS open dataset.

In 2013, I published the book SQL Optimization in Oracle. Until then, when I taught SQL or PL/SQL training, the “universal” tables EMP and DEPT were enough for me to demonstrate practically everything. The problem came when I started needing examples with a bit more...
OWNER vs JOB_CREATOR in DBMS_SCHEDULER

OWNER vs JOB_CREATOR in DBMS_SCHEDULER

A few days ago I received an email from a subscriber. The question looked simple… but it came with a twist: Good morning Javier, I have two database users: 1. OWNER 2. DBA DBA creates a job where the owner is user OWNER. The job runs without issues. The user DBA is...
Insufficient privileges and PL/SQL

Insufficient privileges and PL/SQL

If you have been working with Oracle for some time, you have most likely seen this scenario: From SQL, an operation works. From an anonymous PL/SQL block, it also works. From a stored procedure… ORA-01031: insufficient privileges. The usual way to try to fix it...