Today we will study to run SQL Script in SQL Server Management Studio.So we will open SQL Server Management Studio (SSMS) installed in our computer.I will explain How To Open SSMS. You can type SQL Server Management Studio in your computer search box and click on SQL Server Management Studio option as shown in below picture
Now you will get a window as Shown below
If we check above picture ,we can understand that
Server Name : DESKTOP-AEGCR6Q\SQL2008
DESKTOP-AEGCR6Q is my computer name and SQL2008 is the instance name on which I installed MS SQL Server
Authentication : Windows Authentication
Then I clicked on Connect button.
Now i got a window as shown below .
As shown in the above picture ,We will click on New Query option
Then I will select my database Upsumdiary from drop down list as shown in the below picture
Now we are going to create Customer table ,insert values to Customer table and Select values from Customer table.let us write SQL Query for Create ,Insert and Select operations and Click Execute button as show in below pictures
create table Customer( Id int, Name varchar(20), City varchar(20))
insert into Customer(Id,Name,City) Values (1,'Tom','Texas') insert into Customer(Id,Name,City) Values (2,'Mary','NewYork')
select * from Customer
Now It is your time to check it in your SQL Server database and please comment your experience.