We can find the difference between the two dates using the following dateparts with the DATEDIFF function. The return data type is int. If …
Read More »MSSQL
Make Sure that Database Mail is running in SQL Server(Failsafe Operator)
Before reading this article, I recommend that you read the articles “How To Configure Database Mail on SQL Server” and “How to Create an …
Read More »DATEADD Function in SQL Server(TSQL)
With the DATEADD function we can add or remove a datepart to a date. Below is a list of the dateparts we can add. …
Read More »SQL Server Edition Upgrade(SQL Server does not use all assigned CPUs)
There was a license-related change in the edition of Enterprise Edition in SQL Server 2012. There are two Enterprise Edition Models. Enterprise Edition with …
Read More »SET DATEFIRST Statement and @@DATEFIRST Function in SQL Server(TSQL)
We can set the first day of the week for a session with SET DATEFIRST Statement. We can query the first day of the …
Read More » Server TCP provider failed to listen on [ ‘any’ 1433]. Tcp port is already in use.
You may receive an error as follows when you want to start SQL Server Service. You need to look at the event viewer. Write …
Read More »IDENT_SEED Function in SQL Server(TSQL)
IDENT_SEED function returns the value of the seed you specified when creating the identitiy column. The value returned by this function does not change …
Read More »Common Table Expression(CTE)
TSQL Developers sometimes want to use the same code block in more than one place when writing a query. Sometimes this case can complicate …
Read More »DBCC CHECKIDENT in SQL Server(TSQL)
The following operations can be performed with the DBCC CHECKIDENT command. The current identitiy value of an identity column can be found. The maximum …
Read More »Using Extended Events To Determine Whether The Database Is Being Used
If you have consolidated your databases, you may want to identify and remove unused databases after some time. In such a case, we need …
Read More »