How to enable or disable or drop a constraint in SQL | Manage Constraints in SQL | SQL Tutorial 2023

preview_player
Показать описание
In this video, I have discussed how to manage the constraints
#constraintsinsql #parnikatutorials #sql

"How to enable or disable or drop a constraint in SQL | Manage Constraints in SQL | SQL Server Tutorial 2023

#ManageConstraints #dropconstraint #disableconstraint #enableconstraint #sqlserver #SQLServerTutorial #SQLTutorial2023 #SQL #SQLTraining #SQLServerTutorials #SQLServerCourse #sqltrainingvideos #sqlservertraining #sqlservertutorialvideos #SQLServer #parnikatutorials

04:40 - how to view constraints for existing table
08:10 - how to view constraints for columns
10:55 - how to disable constraints for columns
11:55 - how to disable constraints for tables
15:55 - how to enable constraints for columns"

SQL constraints are used to specify rules for the data in a table.

Constraints are used to limit the type of data that can go into a table. This ensures the accuracy and reliability of the data in the table. If there is any violation between the constraint and the data action, the action is aborted.

Constraints can be column level or table level. Column level constraints apply to a column, and table level constraints apply to the whole table.

The following constraints are commonly used in SQL:

NOT NULL - Ensures that a column cannot have a NULL value
UNIQUE - Ensures that all values in a column are different
PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table
FOREIGN KEY - Prevents actions that would destroy links between tables
CHECK - Ensures that the values in a column satisfies a specific condition

By default, a column can hold NULL values.

The NOT NULL constraint enforces a column to NOT accept NULL values.

This enforces a field to always contain a value, which means that you cannot insert a new record, or update a record without adding a value to this field.

ALTER TABLE Persons DROP CONSTRAINT PK_Person;

Social media Links:
To get the regular updates:
Playlists:
Virtual Coffee with Jagadeesh:
Digital Logic Design:
Computer Organization and Architecture:
C Programming:
Data Structures:

Theory of Computation:

Compiler Design:

Рекомендации по теме
Комментарии
Автор

cleared till here..moving onto next one :)

zerotohero__ft.bibhor
Автор

Wow, what a clear explanation, thanks a lot!

Spider-Man_
welcome to shbcf.ru