T-SQL – How to reset auto increment to next available number
This T-SQL code will show you how to reset an auto incremented column in SQL Server, specifically when you need to start from the next available number after removing large…
This T-SQL code will show you how to reset an auto incremented column in SQL Server, specifically when you need to start from the next available number after removing large…
This T-SQL code snippet demonstrates how to reset an identity column's auto-increment value back to 1 in SQL Server. It should only be used when the table is empty, as…
This T-SQL code demonstrates how to retrieve the day name from a given date using the DATENAME function in SQL Server.
Learn how to extract the day number from a date using T-SQL with this simple and effective code snippet. Get the day number for any given date in SQL Server.
This T-SQL code demonstrates how to display the name of the current month using the DATENAME function in SQL Server.
This T-SQL code demonstrates how to output numbers as ordinal numbers using CASE statements in SQL Server. Learn how to replace a number with a field and format it correctly…
This T-SQL statement demonstrates how to output the day from a date in ordinal numbers using SQL Server. Learn how to replace `Getdate()` with your date field and format the…
This T-SQL code demonstrates how to convert line separated text in a SQL Server table into comma separated text using multiple nested REPLACE functions.
Learn how to search for accented text in SQL Server using the COLLATE function to ignore accents and find all variations of the searched term.