Skip to content Skip to sidebar Skip to footer
Showing posts with the label Tsql

Can I Loop Through A Table Variable In T-SQL?

Answer : Add an identity to your table variable, and do an easy loop from 1 to the @@ROWCOUNT of… Read more Can I Loop Through A Table Variable In T-SQL?

Best Approach To Remove Time Part Of Datetime In SQL Server

Answer : Strictly, method a is the least resource intensive: a) select DATEADD(dd, DATEDIFF(dd… Read more Best Approach To Remove Time Part Of Datetime In SQL Server

Check Constraint - Subqueries Are Not Allowed In This Context

Answer : SQL Server does not currently support subqueries for CHECK CONSTRAINTs. As you have d… Read more Check Constraint - Subqueries Are Not Allowed In This Context