Tip: Expanding a SQL statement
In all recent versions of the database you can call DBMS_UTILITY.EXPAND_SQL_TEXT to get the “true” version of a SQL that the database will run. It takes your SQL as...
2026-07-03 (first published: 2026-07-02)
132 reads
In all recent versions of the database you can call DBMS_UTILITY.EXPAND_SQL_TEXT to get the “true” version of a SQL that the database will run. It takes your SQL as...
2026-07-03 (first published: 2026-07-02)
132 reads
I type fairly well. Well, I type fast, but I do wear out a backspace key relatively quickly on most keyboards. That and a space bar. AI helps me...
2026-07-01
49 reads
By way of background, a while back I did video called “My New Favourite Join” on the LATERAL clause. The reason I like it is that it lets you...
2026-07-13 (first published: 2026-07-01)
618 reads
How Do You Determine How Much Disk Space You Need If You’re Handed 18 SQL Server Backups and No History? Happy last day of June, dear reader. Today’s post...
2026-06-30
29 reads
Index maintenance has always meant nightly jobs and a window you have to defend. Azure SQL’s new Automatic Index Compaction targets page density directly — so I tested it.
2026-07-10 (first published: 2026-06-30)
319 reads
I’m sure you’ve all heard the tale of Goldilocks and the Three Bears, but I’d like to apply the Goldilocks principle to a database object-namely, a materialized view. You...
2026-06-30
127 reads
One of the things I’ve been requesting for a number of years is cost information. I could see this coming in 2015 with the move to the cloud and...
2026-07-13 (first published: 2026-06-29)
223 reads
“Don’t aim to have others like you; aim to have them respect you.” – from Excellent Advice for Living This is an interesting piece of advice. It’s easy to...
2026-06-26
104 reads
Many years ago, before I joined Oracle, I was working on a major modernisation project. We were replacing an existing non-Oracle system with an entirely new Oracle database application...
2026-06-27 (first published: 2026-06-26)
124 reads
If you work with data pipelines, SQL, notebooks, or machine learning models, a Mac with Apple Silicon is genuinely one of the best machines you can have as a...
2026-07-10 (first published: 2026-06-25)
423 reads
By James Serra
Making Data AI-Ready, Part 3 (This is the final article in a three-part series...
By Steve Jones
I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers