How to create Table by using GUI In SQL Server - SQL Server / T-SQL Tutorial Part 37

Scenario:


You are working as SQL Server developer for Trading Company. They have some users who have permission to create tables in one of the Sandbox Database. You need to show them how to create table by using SSMS GUI. The users don't know much T-SQL , so they are interested only to create table by graphical interface.

Table Name: Customer
Column Names

First Name : String Data Type ( Max Size 50)
Last Name : String Data Type (Max Size 30)
Age : Integer
Phone Number: 9 Characters
DOB : Date
Gender: Single Character ( M or F)


Solution:

Step 1:
Connect to the SQL Server Instance where database exists. In our Case the Database Name is TechBrothersIT. Expand it and go to Tables tab. Right click and then hit New and click on Table as shown below.



How to create Table in SQL Server from Graphical user interface - SQL Server / T-SQL Tutorial 


Step 2:
A window will open, you will be able to provide Column Names and Data Types as you like. Also you can choose if Column can accept Null values or not. In our case, we are Ok to allow Nulls.

How to create Table in SQL Server by using Graphical User Interface - SQL Server / T-SQL Tutorial


Step 3:
Type all the columns and choose data types as per your requirements as shown. Once done. Hit Save button and it will ask you to provide the name you like for your table. I have provided Customer. 
How to create Table in SQL Server by using Graphical User Interface(GUI) - SQL Server Tutorial

Once you hit Ok, table will be created in Database.


Video Demo : How to use Graphical user interface to create table in SQL Server 

No comments:

Post a Comment