Create table in SQL using Excel


When we create new application that time require database (data model). First we have analyze application and create database(data model) in Excel file. when analyze  is complete then after we have create manually database in SQL Server. This process is very time consuming. Every developer has face this issue.


For Solving above problem we have created online ExcelToSql tool. user will upload his Excel file and system will return SQL query. Just copy it and paste your SQL server. Enjoy it.

Define Columns

Column Name Define
TableName Enter your Table name which you want In Sql. i.e CountryMaster
Note: Please don’t repeat your Table Name.
ColumnName Enter your Column name. i.e countryID,countryName.
Datatype Enter your Datatype and Size. i.e int,nvarchar(5),bit.
Option This filed is Optional Here you can set your identity,not null. i.e identity(1,1),not null
DefaultValue This filed is used to insert a default value into a column. i.e “India”,GetDate()
Note: Please use double quotation(“) instead of single quotation(‘) if needed.
PK Which filed you are want as Primary Key. Just enter PK in this filed
FK Which filed you are want as Foreign Key. Enter FK in this filed
FKMaster Enter relational table name(“Primary Table”). i.e CountryMaster,StateMaster
FKMasterColumn Enter relational primary key filed name, i.e countryID,stateID

For more information you can  Download Sample File.

Upload your Excel database and Get SQL query.

If this help us. Please share it.


  1. Dhaval Javiya says:

    Nice one article.. its very useful for me while creating database..

  2. piyush k goirya says:

    very good article dude…keep it up…

  3. Per Hübinette says:

    I think this could be really usefull at a planning stage.
    Discusse and work on the database schema together with non technical
    staff using excel(everybody has it) with different sheets for data samples
    and then create the sql scripts.
    Thanks for sharing :)

Leave a Reply to Dhaval Javiya Cancel reply

2 × = 4