Saving Changes Is Not Permitted SQL Server

Saving Changes Is Not Permitted SQL Server

Recently, I was working on an SQL server table and trying to add a new column per my client’s requirement using the SQL Server Management Studio Designer approach. In the designer view, I entered the column name and chose the data type, and when I clicked on the Save button, I got the saving changes … Read more

How To Add A Column To A Table In SQL Server

How to add a column to a table in SQL Server

Recently, my team was required to add a new column with critical data to an existing table. We used the ALTER TABLE Statement in the SQL server to add a column to the table. But before that, we ensured that we took the proper backup. Let us discuss this with a real-time example to give … Read more

How To Check SQL Server Version

how to check sql server version

For one of the requirements, my client asked me, “What is the SQL server version you are using?” Let me tell you there are four simple approaches to checking this. Approach-1: Using SQL Server Management Studio Object Explorer 1. Open your SQL Server Management Studio and login using the required credentials. 2. You will find … Read more

How To Create A Temp Table In SQL Server

How to create a temp table in SQL Server

Temp tables in SQL Server can be local or global. The name of the local temporary table starts with a # symbol, whereas the name of the Global temp table starts with a ## symbol. Below are two simple approaches to creating the temp table. Approach 1: Using the standard Create statement You can use … Read more

How To Reset Identity Column Value In SQL Server

How to reset identity column value in SQL Server

We can use the identity column to generate an autogenerated and identity value in SQL Server. It has 2 values: seed and increment. Now, the new values will be autogenerated based on these values. The syntax is like below. Now, Let’s understand this concept with an example of when the reset identity column is required … Read more

How To Check Identity Column In SQL Server

How to check identity column in SQL Server

There are multiple ways to check if a column is identity in SQL Server. We will discuss each approach individually. How to check if column is identity in SQL Server Approach-1: Using SQL Server Management Studio UI This is the most basic approach that you can utilize. For example, I have an Orders table with … Read more

How To Turn Off Identity Column In SQL Server

How to turn off identity column in SQL Server

I recently participated in a webinar, and one guy asked me about the possible approaches to disabling the identity column in SQL Server. Let me summarize the information for you. To turn off the identity column in SQL, you must set the IDENTITY_INSERT property to OFF. Let’s look at the complete steps with an example … Read more

How To Insert Values Into Table With Identity Column In SQL Server

How to insert values into table with identity column in SQL Server

By default, the SQL server won’t allow you to explicitly insert a value for an identity column. But I was surprised to see a requirement that I got from my client. There is no need to insert an explicit value for the identity column as it is auto-generated and auto-incremented. You just need to provide … Read more

How To Add Identity Column To Existing Table In SQL Server

how to add identity column to existing table in sql server

I was working with my team on a requirement from one of my clients. We were required to add an identity column to an existing critical table in our SQL database. As part of the article, I will explain our approaches to handling this, as it is not supported directly. Note that you can’t directly … Read more

How To Create A Table With Identity Column In SQL Server

How to create a table with identity column in SQL Server

The identity column is crucial for maintaining data integrity and ensuring that each row of your table contains an autogenerated and unique value. It is also crucial in case you are setting primary keys. Note that you can set only one identity column in a table. Once you set the identity property, it is impossible … Read more