---
title: "What are the Actions Performed By SQL Server?"  
description: "What are the Actions Performed By SQL Server?"  
author: "Rahul Roi"  
published: 2020-10-28  
updated: 2020-10-28  
canonical: https://www.mindstick.com/forum/156060/what-are-the-actions-performed-by-sql-server  
category: "mssql server"  
tags: ["database", "mssql server", "sql server"]  
reading_time: 2 minutes  

---

# What are the Actions Performed By SQL Server?

What are the [Actions](https://www.mindstick.com/forum/159456/redux-thunk-middleware-might-throw-an-actions-must-be-plain-objects-exception) Performed By [SQL Server](https://www.mindstick.com/articles/12999/what-is-table-valued-function-in-sql-server)?

## Replies

### Reply by Rahul Roi

So here, we are providing some following options while working with Cascading Referential Integrity Constraints

#### SET NULL:

When a user tries to remove or update any statement(s) that will affect rows in the foreign key table, then those values will be set to NULL when the PrimaryKey's record is removed or updated in the PrimaryKey table. Here, the important thing that we need to keep in mind that the foreign key columns affected must allow NULL values.

#### CASCADE:

When a user wants to remove the statement(s) which will affect the rows in the foreign key table, then those rows will be deleted when the primary key record is deleted. \
Like that, If an update statement affects rows in the foreign key table, then those rows will be updated with the value from the primary key record after it has been updated.

#### SET DEFAULT:

Whenever a delete or update statement affects rows in a foreign key table, then all rows containing those foreign keys are set to the default value. And Each foreign key column in the related table must have default constraints defined on them.

#### NO ACTION:

It is the default action that [SQL](https://www.mindstick.com/articles/13115/types-of-keys-in-sql-or-oracle-database) [Server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over) performs. It specifies that if an update or deletes statement affects rows in foreign key tables, then the action will be denied and rolled back. An error message will be raised.


---

Original Source: https://www.mindstick.com/forum/156060/what-are-the-actions-performed-by-sql-server

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
