Programming Language

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

7,521 reads

External Article

What does SET NOCOUNT ON do?

  • Article

When you’re working with T-SQL, you’ll often see SET NOCOUNT ON at the beginning of stored procedures and triggers. What SET NCOUNT ON does is prevent the “1 row affected” messages from being returned for every operation. Read Brent's blog to see him demo it by writing a stored procedure in the Stack Overflow database.

2021-07-05

Blogs

SQL Server Logins vs. Users: Why You Really Need to Know the Difference

By

The Two-Layer Model Explained “We added them to the database, but they still can’t...

Using AI to Test a SQL Query

By

Someone sent me this code. WITH p AS ( SELECT ID, ROW_NUMBER() OVER (ORDER...

Your SQL Starting Line: Best Free Databases for Beginners

By

Wondering which database to tackle first? I’ve got the lowdown on the top free...

Read the latest Blogs

Forums

can ssrs detect rls and cls thru proxy like user ids?

By stan

Hi we often use non expiring windows and sql accounts to actually run (credential...

Changing the Paradigm of Work

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Changing the Paradigm of Work

Removing a File

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Removing a File

Visit the forum

Question of the Day

Removing a File

I attempted to use ALTER DATABASE to remove a file from my filegroup in SQL Server 2022. There are 4 files in this filegroup, but I don't need them all. However, I received a message that the file was not empty. How do I empty this file so it can be removed?

See possible answers