Database Explorer

Database Explorer is used to create a database in SQL Server as well as you can execute an SQL query over here.

Note: This function is only supported for MS SQL and PostGRE.

Create a table is a function of Sheetkraft which helps in creating a table in a database. This can be achieved with the help of database explorer. The following guidelines explain how to create a table:

Step 1:

On SheetKraft ribbon, click on the Database Explorer tab.

Step 2:

Select the Database Type as SqlServer

Step 3:

Connect to the relevant data source by inserting the connection string which can be created by

a) Go to Import from Database tab.

b) Setup the connection by entering the Data Source.

c) Copy the connection string

Step 4:

Select the data range, for which table structure is needed to be constructed.

Step 5:

Click on Infer Columns (SheetKraft will read and interpret relevant details), make the relevant columns primary key and tick the column which can be nullable.

  • The PRIMARY KEY constraint uniquely identifies each record in a table. Primary keys must contain UNIQUE values, and cannot contain NULL values. Whereas UNIQUE KEY is unique but can take null values.

  • Default values, in the context of databases, are preset values defined for a column type. Default values are used when many records hold similar data.

  • Nullable are the columns which can take null values.

  • Type is the data type of the column and max is the size of data it can take

  • Data types are -

    • Boolean

    • Integer

    • Number

    • Text

Step 6:

Provide the Schema and Table name and then click on Generate SQL

Step 7:

After this, in the same UI click on the SQL tab below the Connection String bar and in that click on Run Non-Query.

Run Non-Query/Run Query A query is something that returns one or more row sets. Select * from TABLENAME is a query that returns a single row set. create table ... is not a query. It doesn't return tabular data.

Run Query runs a query and shows the result as a table whereas Run Non-Query executes the SQL and neither expects nor displays a result.

Step 8:

Query is executed successfully and your table is created in the database.