How To Alter User-Defined Table Types in SQL Server

I cannot use ALTER to modify the type nor can I drop and recreate it since it is being referenced by existing Stored Procedures. That means, reference must be removed first. In this post, We will learn how to alter User-Defined Table types in SQL Server. Example Case: Let’s say we have multiple stored procedure Read more about How To Alter User-Defined Table Types in SQL Server[…]

How To Get Row Count For All Tables In SQL Server Database

Recently, I was working in analyzing a healthcare database where one simple task was to identify the big tables in terms of “Number of records”. So. I needed to get the row count for each tables in a SQL Server Database. There are many way to get this data. See the below T-SQL scripts: 1. Read more about How To Get Row Count For All Tables In SQL Server Database[…]

How to Track Stored Procedure, Function, View changes in SQL Server

Do you want to track the changes made on database objects like Stored Procedures, Views, Functions? SQL Server supports DDL Triggers that can be used to accomplish this task. SQL Server DDL Triggers is a special kind of trigger that fire in response to Data Definition Language (DDL) statements – CREATE, ALTER, DROP (Table, Function, Read more about How to Track Stored Procedure, Function, View changes in SQL Server[…]

How to Design Memory Optimize Database using SQL Server In-Memory OLTP

‘In-Memory OLTP’ also known as ‘Hekaton’ and ‘In-Memory Optimization’ is in-memory processing technology that allows you to get most out of SQL Server for your transactional workloads. This feature was introduced with SQL Server 2014 release. This post demonstrates the usage of In-Memory OLTP feature with examples. Create A Database 1 2 — Create a Read more about How to Design Memory Optimize Database using SQL Server In-Memory OLTP[…]

Different types of keys in SQL Server

What is Key in SQL? SQL Keys are logical database objects that play a very important role in database. Strictly speaking, a KEY is a constraint or rule that is used for data consistency and accuracy, to maintain uniqueness, to create relationships between database object and optimization purposes etc. For Example: A NOT NULL constraint is a rule that Read more about Different types of keys in SQL Server[…]

Triggers in SQL Server

In this post, I will give you the basic idea about the SQL Server Triggers and will explain about the advantages and disadvantages of using triggers. A trigger is a special kind of a T-SQL program that gets automatically executed in response to certain action on the table like insertion, deletion or updation of data. Read more about Triggers in SQL Server[…]