SQL SERVER

 Hey Guys, I hope that you are enjoying with my blogs writing and today's we will cover some  "SQL SERVER" Concepts.


Microsoft SQL Server is a relational database management system, or RDBMS, developed and marketed by Microsoft.
As a database server, it is a software products with primary function of storing and retrieving data as requested by other software application.
Initial Releases is April 24, 1989;

  1. Click here to Download SQL Server
  2. Click here to Download SQL Server Management Studio . After download this application just connect to the required server like that

  3. To create the new Database:  Go to Right side Object Explorer->Right click on Database->new database->Give Database Name->ok and refresh. Now Database has been created name SGM2021.
                              
   To create the new table in SGM2021 Database: Go to table->Right click->new table ->Give data and data type-> cltr+s-> give the table name->ok and refresh.

                   


To check , The table has created or not go to New query write " select * from table_name " and execute like.

Q. What is Primary Key in SQL Server ?.
  • A primary key is a field in a table which uniquely identifies each row/record in a database table. 
  • Primary keys must contain unique values. 
  • A primary key column cannot have NULL values.
  • Above has created table Select one or more column->Right click->Click on primary key and finally Primary key has applied as per requirement.
  • For Example we have taken "id" as a Primary key in below table.
 Q. How can I create primary key and foreign key relationship ?
  • To create the relationship of Primary key and foreign key we have to create two different table first one has created above "tblcustomer" with Primary key. And next table has created "tbladdress". 


To Create Relationship: Select Customerid_fk->Right click->Click on Relationship->Add->There will be two options to select data like:
                   -> then Ok







                                          Thank you...



ليست هناك تعليقات:

إرسال تعليق