In this article, We’ll go over the different types of views in SQL Server through examples. In addition, we will learn how to create, alter, update, and delete views in SQL Server.
Views in SQL Server What is a view in SQL? Views in SQL Server are nothing more than virtual tables based on the result sets of SQL statements from one or more tables.
Continue reading “View In SQL | Types Of Views In SQL Server ” SQL Server Trigger Update, Insert, Delete What is a trigger in the SQL server?
trigger in an SQL Server is a special kind of that is fired or triggered automatically when a given event such as stored procedure occurs against a table in a database. Insert, Update, or Delete How To Create SQL Server Trigger For Update Event?
Continue reading “SQL Server Trigger Update, Insert, Delete Examples”
In this article, we will learn DELETE CASCADE rules in SQL Server with foreign key constraint having multiple examples.
OVERVIEW – SQL DELETE CASCADE
: In the SQL server, when we create a foreign key using the delete cascade option, it deletes all the related rows from the child table when the referenced row is deleted from the parent table having primary key constraint. DELETE CASCADE SQL-Delete cascade rule
The following are the SQL scripts that create a parent (Departments), child (Employees) table, and a foreign key on the child table without the delete cascade rule.
Continue reading “SQL Delete Cascade – SQL query to delete parent-child referenced rows” Introduction
: In this SQL Operators article, we will learn all about
SQL Comparison operators
in details with multiple examples.
image-SQL Comparison Operators SQL Server Comparison Operators
Continue reading “SQL Comparison Operators |SQL Less than Operator, Not Equal operators” What is the primary key in SQL Server?
In SQL Server, a
Primary Key is a field or column which uniquely identifies each and every record in a table. A primary key column doesn’t allow to insert null or duplicate values. A Primary key can consist of up to 16 columns. A table can have only one primary key which can be applied on single or multiple columns. The primary key consist of multiple columns or fields is known as the Composite primary key. A Primary Key constraint can be applied to the columns having any data types. A primary key by default creates a clustered index on the column.
A primary key can be created at the column or table level.
Primary Key Constraint in SQL Server Syntax to create a primary key
The following are the syntax to create a primary key in SQL server.
Continue reading “Primary Key Constraint In SQL Server”