Monthly Archives: January 2015

T-SQL: Delete All Rows From a Table Except Top(N) Rows

I added the article which comes from a question that asked in MSDN forum. The problem is how to delete all rows from a table but remain the Top (N) rows, for example, remaining only the top (1000) rows. All Code samples … Continue reading

Posted in Best Practices, Joy of T-SQL, SQL General Information, T-SQL Tips & Tricks

T-SQL: Error Handling for CHECK Constraints

Happy New Year 2015 to all! 🙂 This is my first post in new year and wish I will be more active this year! In the former article about CHECK constraints, we did not cover how to handle the errors when … Continue reading

Posted in Best Practices, T-SQL Tips & Tricks