Be Stronger Then You Excuses

Happiness is the best medicine.

Connecting to SQL Server using SSMS,Install Sql server 2019 Step by Step

Introduction In this post, we'll go over step-by-step instructions for installing Microsoft SQL Server on Windows computers. We'll use Windows Server 2019 and SQL Server 2019 Developer edition for this tutorial. Pre-requisites Using a Windows computer with a 2 core and 4 GB of RAM Download the 2019 Developer Edition of SQL Server. Download the SQL Server installation...

Creating altering and dropping a database

 Creating database From GUI:-Open SQL Server Management and right-click of database and click new database opti...

Creating and working with table

The aim of this post is to create tblperson and tblgender tables and establish primary key and foreign key constrain...

Adding A default constraints

A column default can be specified using default constraints. The default constraint is used to insert a default value into a column. The default value will be added to all new record, if no other values is specified, including null.Altering an existing column to add a default constraintSyntax:-Alter table table_name add constraint (constraints_name) default  (default_value)...

Cascading referential integrity constraint

Cascading referential integrity constraint allow to define the action MS sql server should taken when a user attempt to delete or update a key to which exiting foreign key poin...

Adding a check Constraint

 Check Constraint:-  Check Constraint is used to limit the range of the values, Which can be entered into a column.The general formula for check constraint in sql server Alter tabla (tablname) add constraint (constraint name) check (Boolean expression...

Identity Column in SQL Server

What is an Identity Column?If a column is marked as an identity column, then the value for this column are automatically generated, when you inserted a new row in the table.Create an Identity column Create a table tblemployee, this statement marks PersonId as an identity column with seed = 1 and Identity Increment = 1. Seed and Increment values are optional. If you do...

Unique key constraint

 We use the UNIQUE constraint to enforce the uniqueness of a column i.e. the column should not allow any duplicate values. We can add a unique constraint through the designer or using a query.To add a unique constraint using MS SQL Server Management Studio Designer:1. Right click on the table and select Design option.2. Right click on the column and select Indexes/Keys...

Select statement in MS sql server

 SELECT Column_ListFROM Table_NameIf you want to select all the data(column), you can also use (* ) For better performance use the column list, instead of using (*.)SELECT * FROM Table_NameTo Select distinct rows use DISTINCT keywordSELECT DISTINCT Column_List FROM Table_NameExample: Select distinct city from tblPersonFiltering rows with WHERE clauseSELECT Column_List FROM...