{"id":76835,"date":"2022-08-05T10:42:13","date_gmt":"2022-08-05T08:42:13","guid":{"rendered":"https:\/\/jotelulu.com\/en-gb\/blog\/"},"modified":"2025-12-12T10:46:37","modified_gmt":"2025-12-12T09:46:37","slug":"create-sql-server-table-script","status":"publish","type":"post","link":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/","title":{"rendered":"Create a SQL Server Table Using a Script"},"content":{"rendered":"\r\n<p>Discover <strong>how to create a SQL Server table using a script<\/strong> so you don\u2019t have to do it through the graphical interface of SQL Server Management Studio.<\/p>\r\n\r\n\r\n\r\n<p>Sometimes we may need to <strong>deploy databases<\/strong> or deploy <strong>new tables<\/strong> in our SQL Server Database Management System, and doing it manually through the graphical interface can be a real headache. For this reason, we will see how to perform this task in a much more logical and comfortable way, by <strong>entering Transact-SQL commands.<\/strong><\/p>\r\n\r\n\r\n\r\n<p>This tutorial <strong>does not aim to be a complete guide to Transact-SQL or ANSI SQL<\/strong>, so we will not go into great detail about syntax or the hundreds of options available when creating tables or any SQL elements. Therefore, at the end of the tutorial, we will provide a couple of links that complement the information presented here. \u00a0<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>How to create a SQL Server table using a script?<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n<h3 class=\"wp-block-heading\"><strong>Prerequisites or pre-configuration<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>To successfully complete this tutorial and create a table using a script on our Jotelulu SQL Server, you will need:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>First, to be <strong>registered on the Jotelulu Platform<\/strong> with an organization and logged in via <a href=\"https:\/\/admin.jotelulu.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Log-in<\/a>.<\/li>\r\n<li>Second, <a href=\"https:\/\/jotelulu.com\/en-gb\/products\/servers\/\" target=\"_blank\" rel=\"noreferrer noopener\">have an active Server subscription<\/a>.<\/li>\r\n<li>Have a <strong>working Windows server<\/strong> within the subscription with <strong>SQL Server<\/strong> installed.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>&nbsp;<\/p>\r\n<h3 class=\"wp-block-heading\"><strong>Step 1. Creating the code to execute<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>The first thing we need to do is understand a bit about how to connect, manipulate data, etc., within SQL Server, but as mentioned before, without going into too much detail.<\/p>\r\n\r\n\r\n\r\n<p>To <strong>connect<\/strong> to the database, use the <strong>\u201cUSE &lt;DATABASE_NAME&gt;\u201d command<\/strong>, where <strong>&lt;DATABASE_NAME&gt;<\/strong> is the <strong>name of the database<\/strong> you want to connect to, and where the table we are going to create will be added.<\/p>\r\n\r\n\r\n\r\n<p>Next, enter the commands to <strong>create the table<\/strong>, which has a fairly simple syntax:<\/p>\r\n\r\n\r\n\r\n<p><em>CREATE TABLE &lt;TABLE_NAME&gt; ( )<\/em><\/p>\r\n\r\n\r\n\r\n<p>Where <strong>&lt;TABLE_NAME&gt;<\/strong> refers to the <strong>name we will give the table<\/strong> during creation, which will later be used to reference it.<\/p>\r\n\r\n\r\n\r\n<p>Inside the table, we will have rows and columns. <strong>The columns<\/strong> will represent the <strong>fields of the table<\/strong>, while the <strong>rows<\/strong> will represent the <strong>different entries<\/strong> of items in the table.<\/p>\r\n\r\n\r\n\r\n<p>When <strong>defining fields (columns)<\/strong>, we should consider at least two elements: the <strong>field name<\/strong> and the <strong>data type<\/strong> being stored.<\/p>\r\n\r\n\r\n\r\n<p>Regarding the name, not much else needs to be added, except that it should be as descriptive as possible to avoid confusion when filling the table. When discussing data types, we can go a bit further and say that <strong>the following types exist<\/strong> (ordered by type and alphabetically within each type):<\/p>\r\n\r\n\r\n\r\n<p>Exact numeric types:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>bigint<\/li>\r\n<li>bit<\/li>\r\n<li>decimal<\/li>\r\n<li>int<\/li>\r\n<li>money<\/li>\r\n<li>numeric<\/li>\r\n<li>smallint<\/li>\r\n<li>smallmoney<\/li>\r\n<li>tinyint<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Approximate numeric types:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>float<\/li>\r\n<li>real<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Date and time types:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>date<\/li>\r\n<li>datetime<\/li>\r\n<li>datetime2<\/li>\r\n<li>datetimeoffset<\/li>\r\n<li>smalldatetime<\/li>\r\n<li>time<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Character strings:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>char<\/li>\r\n<li>text<\/li>\r\n<li>varchar<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Unicode character strings:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>nchar<\/li>\r\n<li>ntext<\/li>\r\n<li>nvarchar<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Binary strings:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>binary<\/li>\r\n<li>image<\/li>\r\n<li>varbinary<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>In practice, we usually work with a <strong>limited number of types<\/strong>, for example: <strong>decimal, int, float, real, date, char, varchar, binary<\/strong>.<\/p>\r\n\r\n\r\n\r\n<p>Other points to consider include whether we allow <strong>fields to remain empty<\/strong> or whether all fields must be filled. To enforce a field to be filled, add <strong>\u201cNOT NULL\u201d<\/strong> after the type.<\/p>\r\n\r\n\r\n\r\n<p>You can also declare if a column is a <strong>primary key (PRIMARY KEY)<\/strong>, if it must have a <strong>unique value (UNIQUE)<\/strong>, etc. For now, we will work with the basics: declaring the type and whether null values are allowed.<\/p>\r\n\r\n\r\n\r\n<p>The example we will create is a User table with the following fields:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li><strong>DNI<\/strong>: an integer (int) that cannot be left empty (NOT NULL).<\/li>\r\n<li><strong>First Name<\/strong>: a character string up to 128 characters (varchar(128)) that cannot be left empty (NOT NULL).<\/li>\r\n<li><strong>Last Name<\/strong>: a character string up to 128 characters (varchar(128)) that cannot be left empty (NOT NULL).<\/li>\r\n<li><strong>Gender<\/strong>: a character string up to 20 characters (varchar(20)) that cannot be left empty (NOT NULL).<\/li>\r\n<li><strong>Age<\/strong>: a number (smallint) and can be left empty.<\/li>\r\n<li><strong>Birth Date<\/strong>: a date (datetime) and can be left empty.<\/li>\r\n<li><strong>Phone<\/strong>: an integer (int) that can be left empty (NULL).<\/li>\r\n<li><strong>Email<\/strong>: a character string up to 128 characters (varchar(128)) that can be left empty (NULL).<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>The SQL declaration would be as follows:<\/p>\r\n\r\n\r\n\r\n<p><em>CREATE TABLE dbo.User ( DNI int NOT NULL ,FirstName varchar(128) NOT NULL ,LastName varchar(128) NOT NULL ,Gender varchar(20) ,Age smallint ,BirthDate datetime ,Phone int ,Email varchar(128) );<\/em><\/p>\r\n\r\n\r\n\r\n<p>Additionally, we can specify the database where the table should be created. If necessary, <strong>we can create the database<\/strong> using the <strong>\u201cCREATE DATABASE\u201d command<\/strong>. Also, include the <strong>\u201cGO\u201d statement<\/strong> after each command to execute them individually; otherwise, the table might not exist when attempting to use it, causing an error.<\/p>\r\n\r\n\r\n\r\n<p>Thus, we could run the following sequence:<\/p>\r\n\r\n\r\n\r\n<p><em>CREATE DATABASE Clients;<\/em><\/p>\r\n\r\n\r\n\r\n<p><em>GO<\/em><\/p>\r\n\r\n\r\n\r\n<p><em>USE Clients; GO\u00a0\u00a0\u00a0<\/em><\/p>\r\n\r\n\r\n\r\n<p><em>CREATE TABLE dbo.User ( DNI int NOT NULL ,FirstName varchar(128) NOT NULL ,LastName varchar(128) NOT NULL ,Gender varchar(20) ,Age smallint ,BirthDate datetime ,Phone int ,Email varchar(128) );<\/em><\/p>\r\n\r\n\r\n\r\n<p>And with this, the definition is complete. \u00a0<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\"><strong>Step 2. Execute our code on the database<\/strong><\/h3>\r\n\r\n\r\n\r\n<p>Now that we know what will be executed, we will perform the process <strong>to run it from SSMS (SQL Server Management Studio)<\/strong>. This allows us to deploy the new table (and database if needed).<\/p>\r\n\r\n\r\n\r\n<p>First, <strong>access the SSMS console<\/strong> and authenticate against the instance where you will work, usually the default instance unless changed.<\/p>\r\n\r\n\r\n\r\n<p>Once inside SSMS, click <strong>\u201cNew Query\u201d<\/strong> (1).<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Abrimos20una20nueva20query20para20poder20copiar20nuestro20cC3B3digo20de20creaciC3B3n20de20la20tabla20SQL-800x427-2.jpg\" alt=\"Step 1. Open a new query to copy our SQL table creation code\" \/><\/p>\r\n\r\n\r\n\r\n<p>Step 1. Open a new query to copy our SQL table creation code<\/p>\r\n\r\n\r\n\r\n<p>Paste the <strong>previously created code<\/strong> (2), making sure no strange characters or extra spaces were introduced, which can happen when pasting from some editors.<\/p>\r\n\r\n\r\n\r\n<p>Click <strong>\u201cExecute\u201d<\/strong> (3) to run the commands. You will see <strong>messages<\/strong> (4) updating as the execution progresses, usually very quickly. If successful, a <strong>\u201cQuery executed successfully\u201d<\/strong> message will appear (5). If there are errors, they will appear in the message window (4) and (5).<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Introducimos20el20cC3B3digo20de20creaciC3B3n20de20la20tabla2C20lanzamos20la20ejecuciC3B3n20y20comprobamos20si20ha20ido20todo20bien-800x427-2.jpg\" alt=\"Enter the table creation code, execute, and check if everything went well\" \/><\/p>\r\n\r\n\r\n\r\n<p>Enter the table creation code, execute, and check if everything went well<\/p>\r\n\r\n\r\n\r\n<p>After running the commands, go to <strong>\u201cObject Explorer\u201d<\/strong> (6) to check if the elements created by your code exist. You may need to expand \u201cDatabases\u201d to find the database created (\u201cClients\u201d), then expand \u201cTables\u201d to see the created tables.<\/p>\r\n\r\n\r\n\r\n<p>If you cannot see the created elements, click <strong>\u201cRefresh\u201d<\/strong> (7). If the view still does not update, close and reopen SSMS. As many know, graphical consoles in Microsoft often require manual refresh.<\/p>\r\n\r\n\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Comprobamos20el20contenido20del20explorador20de20objetos20para20ver20si20se20ha20creado20correctamente20la20tabla-800x428-2.jpg\" alt=\"Check Object Explorer to verify table creation\" \/><\/p>\r\n\r\n\r\n\r\n<p>Check Object Explorer to verify table creation<\/p>\r\n\r\n\r\n\r\n<p><strong>NOTE:<\/strong> <em>When executing commands, it may report success but not immediately display changes. Usually, clicking \u201cRefresh\u201d will reveal changes, but if not, exiting and re-entering SSMS should solve the problem.<\/em><\/p>\r\n\r\n\r\n\r\n<p>To learn more, see examples of creating tables using CREATE TABLE in the Microsoft documentation: <a href=\"https:\/\/docs.microsoft.com\/es-es\/sql\/t-sql\/statements\/create-table-transact-sql?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\">CREATE TABLE (Transact-SQL) &#8211; SQL Server<\/a><\/p>\r\n\r\n\r\n\r\n<p>For further reading on Transact-SQL, see the Microsoft documentation: <a href=\"https:\/\/docs.microsoft.com\/es-es\/sql\/t-sql\/language-reference?view=sql-server-ver16\" target=\"_blank\" rel=\"noreferrer noopener\">Transact-SQL Reference (Database Engine)<\/a>. \u00a0<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\"><strong>Conclusions and next steps:<\/strong><\/h2>\r\n\r\n\r\n\r\n<p>The process described in this tutorial allows you to quickly create tables and even databases using code on your SQL Server instances in Jotelulu.<\/p>\r\n\r\n\r\n\r\n<p>We hope this small guide helps you deploy tables in SQL Server. If you encounter any issues, don\u2019t hesitate to contact us for assistance.<\/p>\r\n\r\n\r\n\r\n<p><strong>Thank you for your trust!<\/strong><\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Discover how to create a SQL Server table using a script so you don\u2019t have to do it through the graphical interface of SQL Server Management Studio. Sometimes we may need to deploy databases or deploy new tables in our SQL Server Database Management System, and doing it manually through the graphical interface can be [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":12359,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[278],"tags":[],"class_list":["post-76835","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-and-systems"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create a SQL Server Table Using a Script - Jotelulu<\/title>\n<meta name=\"description\" content=\"Learn how to create a SQL Server table using a script to avoid the SQL Server Management Studio graphical interface.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a SQL Server Table Using a Script - Jotelulu\" \/>\n<meta property=\"og:description\" content=\"Learn how to create a SQL Server table using a script to avoid the SQL Server Management Studio graphical interface.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/\" \/>\n<meta property=\"og:site_name\" content=\"Jotelulu\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-05T08:42:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-12T09:46:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"799\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Juan Ignacio Oller Aznar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juan Ignacio Oller Aznar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/\"},\"author\":{\"name\":\"Juan Ignacio Oller Aznar\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"headline\":\"Create a SQL Server Table Using a Script\",\"datePublished\":\"2022-08-05T08:42:13+00:00\",\"dateModified\":\"2025-12-12T09:46:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/\"},\"wordCount\":1171,\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg\",\"articleSection\":[\"Cloud and Systems\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/\",\"name\":\"Create a SQL Server Table Using a Script - Jotelulu\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg\",\"datePublished\":\"2022-08-05T08:42:13+00:00\",\"dateModified\":\"2025-12-12T09:46:37+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\"},\"description\":\"Learn how to create a SQL Server table using a script to avoid the SQL Server Management Studio graphical interface.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg\",\"contentUrl\":\"https:\\\/\\\/jotelulu.com\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg\",\"width\":1280,\"height\":799,\"caption\":\"Crear una tabla de SQL Server mediante script\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/blog\\\/create-sql-server-table-script\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a SQL Server Table Using a Script\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#website\",\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/\",\"name\":\"Jotelulu\",\"description\":\"Cloud Paradise for Tech Companies\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/#\\\/schema\\\/person\\\/2ae97818cae086c48f108cd74234aca9\",\"name\":\"Juan Ignacio Oller Aznar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g\",\"caption\":\"Juan Ignacio Oller Aznar\"},\"url\":\"https:\\\/\\\/jotelulu.com\\\/en-gb\\\/author\\\/juanignaciooller\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create a SQL Server Table Using a Script - Jotelulu","description":"Learn how to create a SQL Server table using a script to avoid the SQL Server Management Studio graphical interface.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/","og_locale":"en_GB","og_type":"article","og_title":"Create a SQL Server Table Using a Script - Jotelulu","og_description":"Learn how to create a SQL Server table using a script to avoid the SQL Server Management Studio graphical interface.","og_url":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/","og_site_name":"Jotelulu","article_published_time":"2022-08-05T08:42:13+00:00","article_modified_time":"2025-12-12T09:46:37+00:00","og_image":[{"width":1280,"height":799,"url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg","type":"image\/jpeg"}],"author":"Juan Ignacio Oller Aznar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Juan Ignacio Oller Aznar","Estimated reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/#article","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/"},"author":{"name":"Juan Ignacio Oller Aznar","@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"headline":"Create a SQL Server Table Using a Script","datePublished":"2022-08-05T08:42:13+00:00","dateModified":"2025-12-12T09:46:37+00:00","mainEntityOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/"},"wordCount":1171,"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg","articleSection":["Cloud and Systems"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/","url":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/","name":"Create a SQL Server Table Using a Script - Jotelulu","isPartOf":{"@id":"https:\/\/jotelulu.com\/en-gb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/#primaryimage"},"image":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/#primaryimage"},"thumbnailUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg","datePublished":"2022-08-05T08:42:13+00:00","dateModified":"2025-12-12T09:46:37+00:00","author":{"@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9"},"description":"Learn how to create a SQL Server table using a script to avoid the SQL Server Management Studio graphical interface.","breadcrumb":{"@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/#primaryimage","url":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg","contentUrl":"https:\/\/jotelulu.com\/wp-content\/uploads\/2022\/10\/Crear-tabla-de-SQL-Server-mediante-script-1.jpg","width":1280,"height":799,"caption":"Crear una tabla de SQL Server mediante script"},{"@type":"BreadcrumbList","@id":"https:\/\/jotelulu.com\/en-gb\/blog\/create-sql-server-table-script\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/jotelulu.com\/en-gb\/"},{"@type":"ListItem","position":2,"name":"Create a SQL Server Table Using a Script"}]},{"@type":"WebSite","@id":"https:\/\/jotelulu.com\/en-gb\/#website","url":"https:\/\/jotelulu.com\/en-gb\/","name":"Jotelulu","description":"Cloud Paradise for Tech Companies","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jotelulu.com\/en-gb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/jotelulu.com\/en-gb\/#\/schema\/person\/2ae97818cae086c48f108cd74234aca9","name":"Juan Ignacio Oller Aznar","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/87efd80399b2c40a1d78dd5cee4e788d3f6c29d33e3b67bcfbc6abbf91d0fdcf?s=96&d=mm&r=g","caption":"Juan Ignacio Oller Aznar"},"url":"https:\/\/jotelulu.com\/en-gb\/author\/juanignaciooller\/"}]}},"_links":{"self":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/comments?post=76835"}],"version-history":[{"count":2,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76835\/revisions"}],"predecessor-version":[{"id":76848,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/posts\/76835\/revisions\/76848"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media\/12359"}],"wp:attachment":[{"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/media?parent=76835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/categories?post=76835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jotelulu.com\/en-gb\/wp-json\/wp\/v2\/tags?post=76835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}