SELECT *
FROM Employees
WHERE PhoneNumber IN (
SELECT PhoneNumber
FROM Employees
GROUP BY PhoneNumber
HAVING COUNT(Employee_ID) > 1
)
Month: January 2019
Reset identity seed after deleting records in SQL Server
If you need to reset the identity seed after deleting a record/records, you can use the following statement where the last INT value ( eg: 20 below), stands for the row from which you want to reseed from. This would be the last row in the table after deleting the records you want to.
DBCC CHECKIDENT ('Tablename', RESEED, 20); GO
Once you run this, the next entered column will have the identity value ’21’
Remove “IDE0017 VB.NET Object initialization can be simplified”
You can suppress the message in the source or add the message to a suppression file from the ‘Error List’ tab, right-click the message and do as shown below: