TSQL

SQLServerCentral Article

The difference between BIN2 and Case-Sensitive collations in SQL

  • Article

Here you will learn about the key differences between the binary and SQL/Windows collations. You will see that even with all sensitivity flags enabled, SQL/Windows collation cannot behave the same way as the binary collations.

5 (2)

You rated this post out of 5. Change rating

2024-03-15

1,153 reads

SQLServerCentral Article

SQL Window Functions Series: LAG() and LEAD()

  • Article

Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.

5 (3)

You rated this post out of 5. Change rating

2023-12-11

4,517 reads

Technical Article

How to Move a Table into a Schema in T-SQL

  • Script

To move a table into a schema in T-SQL, you can use the ALTER SCHEMA statement along with the TRANSFER option. Here are the steps to do this: Assuming you have an existing schema named "NewSchema" and a table named "YourTable" that you want to move into this schema: Open SQL Server Management Studio or […]

You rated this post out of 5. Change rating

2023-09-29 (first published: )

1,163 reads

External Article

One use case for NOT using schema prefixes

  • Article

I’ve long been a huge advocate for always referencing objects with a schema prefix in SQL Server.

In spite of what may be a controversial title to many of my regular blog readers, I don’t really want you to stop that practice in most of your T-SQL code, because the schema prefix is important and useful most of the time. At Stack Overflow, though, there is a very specific pattern we use where not specifying the schema is beneficial.

2023-09-13

Blogs

Migrate datetime data to datetimeoffset with AT TIME ZONE

By

I recently reviewed, worked on, and added a similar example to the DATETIMEOFFSET Microsoft...

The Comprehensive Guide to Mastering Your SQL DBA Skills

By

Database administrators (DBAs) are the backbone of data-driven organizations. If you're looking to break...

Friday Basics: Authentication vs. Authorization

By

Another security fundamentals topic is authentication versus authorization. For those who have a clear...

Read the latest Blogs

Forums

The OS returned the error '(null)' while attempting 'DeleteFile' filestream.hdr

By lmarkum

I have a SQL Server 2019 Enterprise Edition on CU 25. It has in-memory...

Take Care

By Grant Fritchey

Comments posted to this topic are about the item Take Care

Performance

By LearningDBA

Experts, I am learning some skills so I can troubleshoot some performance-related issues. I...

Visit the forum

Question of the Day

Two Table Hints

What happens when I run this code:

SELECT
  p.ProductName
, p.ProductCategory
FROM dbo.Product AS p WITH (NOLOCK, TABLOCK);

See possible answers