Create Table in SQL Server

In SQL Server by Baqir Ali

After creating a database in SQL Server Now it is time to create a table.


Create a table that stores basic information about a user that can log in to an application the followings are the columns or fields needed in that table.

Field NameData TypeDescription
userIdvarchar(50)it stores user id information, it is unique and also primary key
userPwdvarchar(50)it stores user password
userNamevarchar(50)it stores user name
userPhonevarchar(50)it stores user phone
userEmailvarchar(50)it stores user Email
userStatusbitit stores user status either true or false


There are two ways to solve this problem. It can be either graphically or through code.

Create table using GUI in SQL Server Management Studio

  1. Start SQL Server Management Studio
  2. Expand the database name codemodes
  3. Right click on the tables click on Table
  4. And fill like the following
SQL Server Table

Now set the userId as primary key: Right-click on the row and click on Set Primary key

SQL Server Table

Now save the changes and name the table as user

Support us by sharing this post

About the Author

Baqir Ali

Facebook Twitter

Hi, I am Baqir Ali ---- Blogger, Programmer, and a Teacher. I am currently working as a Programmer for Softnat Technologies. I have tons of ideas and data to share with you all via blogging.