MSSQL Query Blog

Finding Rows with Lowercase Letters in SQL Server

Hello everyone, In this article, I will try to give information about finding rows containing lowercase letters in SQL Server. In SQL Server, in some cases, you may want to find rows containing lowercase letters. You can easily do this by revising the sample code below. SELECT * FROM Customers...

Viewing Table Based Index Information in SQL Server

Hello everybody, In this article, I will try to give information about displaying table-based Index information in SQL Server. In SQL Server, in some cases, you may want to display table-based Index information. You can easily do this using the code below. SELECT sys.objects.object_id, sys.objects.name AS tablename, sys.indexes.name AS indexname,...

Leap Year Checking Function in SQL Server

Hello everybody, In this article, I will try to give information about the leap year control function in SQL Server. In SQL Server, in some cases, you may want to check for leap years. You can easily do this using the function below. CREATE FUNCTION dbo.IsLeapYear ( @year INT )...

Checking Index Fragmentation by Name in SQL Server

Hello to everyone, In this article, I will try to give information about Index fragmentation control by name in SQL Server. In SQL Server, in some cases, you may want to check Index fragmentation by name. You can easily do this using the code below. SELECT dbschemas.[name] as ‘Schema’, dbtables.[name]...

Row and Size Control by Table Name in SQL Server

Hello to everyone, In this article, I will try to give information about row and size control by table name in SQL Server. In SQL Server, in some cases, we may want to check rows and sizes according to the table name. You can easily do this using the code...

Finding the Last Day of the Year in SQL Server

Hello to everyone, In this article, I will try to give information about finding the last day of the year in SQL Server. In SQL Server you may want to find the last day of the year in some cases. You can easily do this using the code below. declare...

Don`t copy text!