Explore SQL Server 2025's new SQL concatenate string with the double pipe operator for efficient data handling.
The post SQL Concatenate String using Double Pipe (||) Operator in SQL Server 2025 appeared first on MSSQLTips.com.
Explore SQL Server 2025's new SQL concatenate string with the double pipe operator for efficient data handling.
The post SQL Concatenate String using Double Pipe (||) Operator in SQL Server 2025 appeared first on MSSQLTips.com.
Sometimes applications need to remove data without actually losing it. Soft delete keeps rows in the database while making them invisible to normal application access. This is especially valuable when exposing a database to an AI agent through an MCP server like SQL MCP Server, where safety and reversibility matter.
Learn about SQL MCP Server
Filtering on an IsDeleted column in every query is fragile. One missed filter exposes your data. Row-Level Security enforces visibility rules inside the database so application code cannot bypass them. Let’s take a look.
Working demo: https://gist.github.com
A Todos table where soft delete is enforced at the database layer.
This example uses a SQL login for simplicity. In Azure SQL, you would typically use a managed identity. The pattern is the same.
CREATE LOGIN TodoDbUser WITH PASSWORD = 'Long@12345';
GO
CREATE USER TodoDbUser FOR LOGIN TodoDbUser;
GO
CREATE TABLE dbo.Todos
(
Id INT IDENTITY(1,1) PRIMARY KEY,
Title NVARCHAR(200) NOT NULL,
State NVARCHAR(20) NOT NULL DEFAULT 'pending',
IsDeleted BIT NOT NULL DEFAULT 0
);
GO
INSERT INTO dbo.Todos (Title, State)
VALUES
('Buy groceries', 'pending'),
('Walk the dog', 'completed'),
('Finish report', 'in-progress'),
('Call mom', 'pending'),
('Clean the house', 'completed');
GO
Instead of issuing a DELETE, the application calls a stored procedure that marks the row as deleted.
CREATE PROCEDURE dbo.DeleteTodo
@Id INT
AS
UPDATE dbo.Todos
SET IsDeleted = 1
WHERE Id = @Id;
GO
This stored procedure is the only delete mechanism exposed to the application.
The application can select and update rows, but it cannot delete them directly.
GRANT SELECT, INSERT, UPDATE ON dbo.Todos TO TodoDbUser;
GRANT EXECUTE ON dbo.DeleteTodo TO TodoDbUser;
GO
At this point, the application still sees deleted rows. Let’s fix that.
Row-Level Security controls which rows are visible to which users. It applies to SELECT, UPDATE, and DELETE. Filtering happens before the statement executes.
CREATE FUNCTION dbo.fn_SoftDeletePredicate(@IsDeleted BIT)
RETURNS TABLE WITH SCHEMABINDING AS
RETURN
SELECT 1 AS fn_result
WHERE
(
DATABASE_PRINCIPAL_ID() = DATABASE_PRINCIPAL_ID('TodoDbUser')
AND @IsDeleted = 0
)
OR DATABASE_PRINCIPAL_ID() <> DATABASE_PRINCIPAL_ID('TodoDbUser');
GO
TodoDbUser sees only rows where IsDeleted = 0CREATE SECURITY POLICY dbo.TodosFilterPolicy
ADD FILTER PREDICATE dbo.fn_SoftDeletePredicate(IsDeleted)
ON dbo.Todos WITH (STATE = ON);
GO
From this point forward, deleted rows are invisible to the application user.
SELECT * FROM dbo.Todos;
EXECUTE AS USER = 'TodoDbUser';
EXEC dbo.DeleteTodo @Id = 2;
REVERT;
EXECUTE AS USER = 'TodoDbUser';
SELECT * FROM dbo.Todos;
REVERT;
The deleted row is hidden from the application user but remains visible to admins.
EXECUTE AS USER = 'TodoDbUser';
UPDATE dbo.Todos SET IsDeleted = 0 WHERE Id = 123;
REVERT;
The application user cannot undelete a row. Row-Level Security hides deleted rows before the UPDATE executes, so the statement matches zero rows.
If you prefer explicit enforcement rather than silent filtering, add a block predicate.
ALTER SECURITY POLICY dbo.TodosFilterPolicy
ADD BLOCK PREDICATE dbo.fn_SoftDeletePredicate(IsDeleted)
ON dbo.Todos AFTER UPDATE;
To use a managed identity instead of a SQL login:
CREATE USER [my-container-app] FROM EXTERNAL PROVIDER;
Reference that user in the predicate function. Everything else stays the same.
The post Enable Soft Delete in Azure SQL appeared first on Azure SQL Devs’ Corner.
Another batch of articles today that impacted my thinking. Thanks to today’s reading list, I installed the MCP server for our Google Developer Knowledge API, realized I was thinking about MCP wrong, and felt grateful for the job changes I didn’t make.
[blog] Introducing the Developer Knowledge API and MCP Server. This is the best thing we’ll deliver this week. Developers (and AI tools) can now access a single source of truth for information about Google products.
[article] Three ways AI will change engineering practices. Don’t disagree with this. Have you planned for each?
[article] To Drive AI Adoption, Build Your Team’s Product Management Skills. It’s likely confirmation bias, but I’m noticing a LOT of conversation about the value of a product management discipline when embracing AI.
[blog] Context Management and MCP. Wow, my favorite post of the day. It definitely made me rethink some things token consumption and Skills.
[blog] Forget technical debt. The point here is that focusing purely on technical debt isn’t sufficient to fixing the problems in the system.
[article] What Happens When Technical Debt Vanishes? More thought experiments about technical debt! This was a compelling read.
[article] IT leaders grapple with AI agent sprawl. New source of debt, incoming! Companies need to get a handle on their agents, data, and integrations.
[blog] Easy FunctionGemma finetuning with Tunix on Google TPUs. I learned like four things from this post, and I’m tempted to actually run this example scenario myself!
[article] Anthropic releases Opus 4.6 with new ‘agent teams’. Is it model update season already? We’ve already made this one available on Vertex AI. OpenAI gave Anthropic about ten minutes in the spotlight.
[article] 4 self-contained databases for your apps. Which databases offer you a no-install binary that’s portable? I’m not sure I thought of this whole set.
[blog] Antigravity the Ralph Wiggum style. Turn your agent-building tool loose and let it relentless tackle a problem until it reaches the goal? It’s not for every case, but seeing this approach may spark ideas.
[article] Kilo CLI 1.0 brings open source vibe coding to your terminal with support for 500+ models. Interesting. These types of tools are getting so powerful.
[blog] I left FAANG for a startup and regretted it. We only seem to hear stories of raging successes after leaving a BIG TECH job. It’s useful to see a different perspective.
Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

For a 31-day series, I had to write much of the content ahead of time. Most of it was completed in November or December 2025. The world of artificial intelligence is moving so quickly, it almost feels like the moment you post something, it’s out of date. This series still stands on its own. I tried not to lean too heavily on any specific agent or technology to keep the perspectives timeless.
My friend Sean Kelly decided to do a little vibe coding of his own (a lot of vibe coding, actually), and created audio versions of this entire series. You can read about his experience figuring out how to create audio files from my articles here. I’ve also added a link to each audio file at the top of each article.
The 31 Days series taught you the fundamentals of AI-assisted development. Now this blog continues the conversation with fresh content every Friday.
Each week I’ll share:
If you haven’t read the 31 Days series yet, start with Day 1: What Is Vibe Coding? to get the full foundation.
The series covers everything from basic prompting patterns to using AI as your security auditor, SRE, and architect. Each article includes real code and honest lessons about what doesn’t work.
Subscribe to get new posts delivered every Friday. No spam. Just practical AI coding insights.
It’s been a busy week. I just got home from Dynatrace’s Perform conference in Las Vegas, and it was definitely a week I will never forget. Had the opportunity to talk about my journey in vibe coding, and how important observability has become as a result. (You can watch it here).
In addition to that, I’ve also created a new app. While this one is invitation only, I updated the README.md on GitHub to showcase its functionality.
This was my first introduction into a few new technologies, including Vercel & Supabase. It was also my first time using Twilio Verify to provide SMS verification as a login mechanism. I’ve heard many developers state that using AI to write software makes you a worse developer, but I’m finding that I’m learning more, faster than I ever did before. I’d still be fighting with the Twilio integration and APIs, and instead, my app is already in production!
I also built another app that is for the Super Bowl game this Sunday. My sister and brother-in-law’s last name is Stuber, and they host the “Stuber Bowl” watch party every year. They have dozens of people participate in “prop bets” like “How long will the National Anthem take (in seconds)?” or “Will the first play from scrimmage ba a run or pass play?” It’s always been managed in a spreadsheet, but in just a few hours on Monday night, I was able to build them an app that has:
I can’t even express how fun software development has become for me again. Until next week!
2026-02-05
/experimental shows help screen listing experimental featuresWe are aware of an issue (starting around 1/28/2026) that caused some applications using GPU-based features of Windows ML, ONNX Runtime, or other components that depend on OpenCL, to crash on some x64 devices that have the Microsoft OpenCL Compatibility Pack. The root cause was a broken update to the Microsoft OpenCL Compatibility Pack, not a defect in developer applications.
A fix has already been released on 2/2/2026 and is currently rolling out automatically to affected devices.
A fixed version of the Microsoft OpenCL Compatibility Pack was released via the Microsoft Store on February 2, 2026, and is currently rolling out automatically to devices. No developer changes are required. Once the updated component is installed, the crash is resolved.
If you or your users are still experiencing crashes, you can manually trigger the update:
For technical background on the underlying OpenCL issue, see microsoft/OpenCLOn12#74