Blog

Page 153 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Add default value of datetime field in SQL Server to a timestamp
datetime

Add default value of datetime field in SQL Server to a timestamp

Published on September 2, 2023

šŸ“ **Title: Adding a Default Timestamp to a DateTime Field in SQL Server** **Introduction** šŸ‘‹ Hey there! Are you struggling with adding a default timestamp to a DateTime field in SQL Server? Don't worry, I've got your back! In this blog post, I'll guide

Cover Image for Difference between "read commited" and "repeatable read" in SQL Server

Difference between "read commited" and "repeatable read" in SQL Server

Published on September 2, 2023

# Understanding the Difference Between "Read Committed" and "Repeatable Read" in SQL Server šŸ“–šŸ’» So, you're working with SQL Server and you find yourself puzzled by the similarities between the "Read Committed" and "Repeatable Read" isolation levels. Fear

Cover Image for How to get first character of a string in SQL?

How to get first character of a string in SQL?

Published on September 2, 2023

# How to Get the First Character of a String in SQL? šŸ¤”šŸ”¤ Are you facing a scenario where you need to extract only the first character of a string in your SQL column? Don't worry, you're not alone! Many developers come across this situation and it's good

Cover Image for SET NOCOUNT ON usage

SET NOCOUNT ON usage

Published on September 2, 2023

## The Great Debate: SET NOCOUNT ON for SQL Server - Yay or Nay? šŸ¤” Should we use SET NOCOUNT ON for SQL Server? If not, why not? This question has been circulating among SQL Server developers, and there seems to be differing views on the matter. Let's di

Cover Image for Select n random rows from SQL Server table
random

Select n random rows from SQL Server table

Published on September 2, 2023

# How to Select Random Rows from SQL Server Table So, you have a SQL Server table with a whopping 50,000 rows and you want to randomly select about 5,000 rows from it. šŸ¤” Don't worry, we've got you covered! We understand the pain of complex solutions and

Cover Image for Not equal <> != operator on NULL
null

Not equal <> != operator on NULL

Published on September 2, 2023

# The Mysteries of the Not Equal Operator on NULL in SQL Are you puzzled by the behavior of the not equal (`<>` or `!=`) operator on NULL in SQL? šŸ¤” Don't worry, you're not alone! Many developers encounter issues when using this operator and struggle to u

Cover Image for Simulating group_concat MySQL function in Microsoft SQL Server 2005?

Simulating group_concat MySQL function in Microsoft SQL Server 2005?

Published on September 2, 2023

# Simulating the group_concat MySQL Function in Microsoft SQL Server 2005 So, you're in a situation where you need to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but hey, that's life). And one of the challenges you're facin

Cover Image for Format SQL in SQL Server Management Studio
formatting

Format SQL in SQL Server Management Studio

Published on September 2, 2023

# How to Format SQL in SQL Server Management Studio šŸ˜ŽšŸ“‹šŸ’» Are you tired of manually formatting your SQL code in SQL Server Management Studio? 😫 Is your code a mangled mess of poorly formatted SQL that's driving you crazy? 😱 Don't worry, we've got you c

Cover Image for Login to Microsoft SQL Server Error: 18456
connection

Login to Microsoft SQL Server Error: 18456

Published on September 2, 2023

šŸ”‘ Microsoft SQL Server Error: 18456 šŸ”‘ šŸ‘‹ Hey there, fellow tech enthusiasts! If you've stumbled upon this blog post, chances are you're facing a common issue that many SQL Server users encounter – the dreaded Error 18456. Don't worry, I'm here to help y

Cover Image for How do I obtain a Query Execution Plan in SQL Server?
performance

How do I obtain a Query Execution Plan in SQL Server?

Published on September 2, 2023

šŸ“ Hey there, SQL enthusiasts! šŸ‘‹ Are you currently finding yourself caught in the web of SQL Server queries and stored procedures? Fear not, for today I bring you a quick and easy guide on how to obtain a Query Execution Plan in SQL Server! šŸš€ šŸ’” Query E