We use the AVG function to obtain the average value of the specified column. Its one of the most used SQL Server functions. Let’s …
Read More »MSSQL
How To Capture Query Timeouts With Extended Events
We can capture Query Timeouts by using SQL Server Extended Events Session. Right click on Management-> Extendend Event-> Sessions on SSMS and select new …
Read More »OVER Clause in SQL Server(TSQL)
We send a dataset to a function by grouping it with the Partition By statement int the OVER Clause. We sort the groups by …
Read More »What is Constraint and SQL Server Constraint Types(TSQL)
Constaint allows us to set specific rules for data in a table. For example; to make sure that the data in a column is …
Read More »NOT NULL Constraint in SQL Server(TSQL)
We can use “NOT NULL Constraint” to prevent values in a column from containing null data. Example: In the following example, when creating a …
Read More »How To Connect To SQL Server From cmd command line
In some cases, SSMS (SQL Server Management Studio) is not installed on the server and you may need to connect to SQL Server from the …
Read More »Like Operator in SQL Server(TSQL)
We use the LIKE operator with WHERE clause. I suggest you read the following article about WHERE clause. “Where Clause in SQL Server and SQL …
Read More »How To List Availability Group Names, Database Names, IPs, Ports, DNS Names in SQL Server
If you are using SQL Server Availability Group and you have multiple availability groups and instances; if you want to list Availability Group Names, Database Names, …
Read More »How To Encrypt SQL Server Stored Procedures, Views and Functions
Stored procedures, functions, and views are objects that each application uses at the database tier. In some cases, it may be necessary to encrypt …
Read More »HAVING Clause in SQL Server and Difference Between WHERE Clause(TSQL)
HAVING Clause is used for filtering like WHERE Clause. The difference is that while WHERE Clause is filtering on ungrouped data, HAVING Clause filters on …
Read More »