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,468 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

6,480 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: )

3,174 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

Playing with the Data API Builder

By

I published an article today on the Data API Builder, which is a way...

A New Word: Dolonia

By

dolonia – n. a state of unease prompted by people who seem to like...

Ways to land data into Fabric OneLake

By

Microsoft Fabric is rapidly gaining popularity as a unified data platform, leveraging OneLake as...

Read the latest Blogs

Forums

Filter a SQL Server Audit with a predicate

By michal.lisinski

Hi Gents, Silly question, but it's been a long time since I've done this....

How to speed up this query?

By water490

Hi everyone I have a query that is taking a real long time.  It...

The New Log File

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The New Log File

Visit the forum

Question of the Day

The New Log File

I have a detached database from SQL Server 2019, called TDE_Primer. This database had a 100MB data file and a 73MB log file. The log file was lost, so I need to run this code:

USE [master]
GO
CREATE DATABASE [TDE_Primer] ON 
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\TDE_Primer.mdf' )
 FOR ATTACH_REBUILD_LOG
GO
How big is the new log file?

See possible answers