Articles tagged #SQL Server
12 article(s)
-
Modern .NET Backend Roadmap — Part 3: Dapper for Fast Reads
Add a Dapper read path beside EF Core: read models behind a port, parameterized SQL, mapping gotchas we actually hit, and when each tool wins.
@llaxmikant · Jun 5, 2026 -
Getting Started with ASP.NET Core Web API and Entity Framework
Build your first ASP.NET Core Web API on .NET 10 with Entity Framework Core — scaffold models from SQL Server, add an async controller, and test with the built-in OpenAPI document and Scalar.
@llaxmikant · May 28, 2026 -
How to Pivot Data in SQL Server
Rotate rows into columns with PIVOT, the CASE alternative for multiple aggregates, dynamic pivots with STRING_AGG and sp_executesql, and UNPIVOT (plus CROSS APPLY VALUES) for the reverse.
@llaxmikant · Mar 6, 2026 -
CROSS APPLY and OUTER APPLY in SQL Server with Examples
Per-row table expressions: top-N-per-group queries, passing row values into table-valued functions, APPLY (VALUES) for named expressions, and when plain JOIN is all you need.
@llaxmikant · Feb 7, 2026 -
SQL Server Common Table Expressions with Examples
CTEs from basics to recursion — readable query pipelines, the top-N-per-group idiom with window functions, chained CTEs, writable CTEs for dedup, and walking hierarchies of any depth.
@llaxmikant · Jan 3, 2026 -
SQL Server Stored Procedure vs User-Defined Function
Functions compute inside queries; procedures do work. The full capability matrix, parameter sniffing notes, and a mechanical decision guide with working examples of each.
@llaxmikant · Dec 15, 2025 -
User-Defined Functions in SQL Server
Scalar, inline table-valued, and multi-statement functions with real outputs — why inline TVFs optimize like views, when scalar UDFs go per-row, and why MSTVFs are a last resort.
@llaxmikant · Nov 26, 2025 -
SQL Server Temporary Table vs Table Variable
Statistics, indexing, scope, and rollback behavior compared with runnable examples — why table variables wreck big-join plans and where they genuinely win.
@llaxmikant · Oct 23, 2025 -
Exception Handling using TRY/CATCH in SQL Server
TRY/CATCH with the ERROR_* functions, the transaction-safety template with XACT_ABORT, re-raising with THROW, error logging that survives rollback, and what CATCH can't catch.
@llaxmikant · Sep 22, 2025 -
Generate Sequence Numbers in SQL Server Queries
ROW_NUMBER, RANK, DENSE_RANK, and NTILE side by side, PARTITION BY for per-group numbering, and persistent numbering with IDENTITY and SEQUENCE — all with verified outputs.
@llaxmikant · Aug 20, 2025 -
SQL Server Constraints with Examples
All six constraint types on one table — PRIMARY KEY, UNIQUE, CHECK, DEFAULT, FOREIGN KEY, NOT NULL — each violated on purpose so you see the real errors, plus naming and FK-index guidance.
@llaxmikant · Jul 22, 2025 -
Types of SQL Server Joins with Examples
INNER, LEFT, RIGHT, FULL OUTER, CROSS, and self joins explained on one dataset with real results — including the anti-join pattern and the WHERE-vs-ON trap that breaks LEFT JOINs.
@llaxmikant · Jun 20, 2025