You can find the name of the SQL Server Instance that you are connected to with the @@ SERVICENAME Function. If the instance you …
Read More »TSQL
The INSERT statement conflicted with the FOREIGN KEY constraint
You can get this error when you want to inset data into a table that has the Foreing Key. It means that there is …
Read More »@@VERSION, SERVERPROPERTY and @@MAX_CONNECTIONS Functions in SQL Server(TSQL)
The maximum number of connections that an instance can accept varies by version. With the @@MAX_CONNECTIONS function, we can query the number of default maximum …
Read More »SET LOCK_TIMEOUT and @@LOCK_TIMEOUT Function in SQL Server(TSQL)
With SET LOCK_TIMEOUT, we can set the maximum amount of time a session will wait to access a blocked resource in milliseconds. If a …
Read More »SET LANGUAGE and @@LANGUAGE Function in SQL Server(TSQL)
We can set a session’s language With SET LANGUAGE Command. This command affects the system datetime format and system messages. If you want to …
Read More »SUM Function in SQL Server(TSQL)
We use SUM Function to calculate the sum of values in a column. SUM is a aggregated function and generally we use it with …
Read More »STRING_AGG Function in SQL Server(TSQL)
We can concatenate string columns with STRING_AGG function. STRING_AGG function requires 2 argument. Thats why we must put seperater between values. Let’s make examples …
Read More »FIRST_VALUE Function in SQL Server(TSQL)
We have mentioned the LEAD and LAG functions announced with SQL Server 2012. In this article, we will examine the FIRST_VALUE function. Now let’s look …
Read More »LEAD and LAG Functions in SQL Server(TSQL)
As a consultant and training provider in business intelligence projects on SQL Server, some analytic functions I expected to be announced for a long time …
Read More »MIN and MAX Functions in SQL Server(TSQL)
We find the minimum value in a column in a dataset, with the MIN Function and we find the maximum value in a column …
Read More »