Easy way to reseed identity column ? TIP #77
Sometimes, we may require to reseed identity column of a table due to various reason.
For example we have deleted a...
2014-12-20
529 reads
Sometimes, we may require to reseed identity column of a table due to various reason.
For example we have deleted a...
2014-12-20
529 reads
Although it is a old feature for those who knows ORACLE but for SQL server developers it is a new...
2014-12-10
281 reads
When you do SQL Server maintenance one of important aspect is available space on server drive because your SQL SERVER...
2014-12-06
351 reads
You are reading this post just because of two reason
1) You are curious whether it is possible or not...
2014-11-20
298 reads
Sometimes it may require that you don’t know what will be output of a stored procedure ? what kind of result...
2014-11-19
475 reads
This is very interesting feature and I recently come to know this awesome feature.
Lets understand this by an example below...
2014-11-14
345 reads
Suppose, sometimes you just need entry in the table with all the default values.
For example you have a Student...
2014-11-10
218 reads
Suppose, We are working on a stored procedure in which some complex operation is going. We are fetching some value...
2014-11-09
304 reads
Hello friends,
Many times it happened with me I forgot the instance name of SQL Server.
So here is a small trick...
2014-11-07
308 reads
Recently , one of my friends shared that some interviewer asked him a question “How to copy table structure only from...
2014-11-03
768 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
WhatsApp CS 628218520154 Jl. Suryopranoto No.40, RT.12/RW.7, Petojo Utara, Kecamatan Gambir, Kota Jakarta Pusat,...
WhatsApp CS 628218520154 Jl. Pegangsaan Timur No.1, Cikini, Kec. Menteng, Kota Jakarta Pusat, Daerah...
WhatsApp CS 628218520154 Jl. Pintu Air Raya No.36 Q, RT.6/RW.1, Ps. Baru, Kecamatan Sawah...
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers