{"id":29244,"date":"2023-11-15T06:22:00","date_gmt":"2023-11-15T05:22:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=29244"},"modified":"2023-11-18T13:33:00","modified_gmt":"2023-11-18T12:33:00","slug":"check-if-column-exists-in-sql-server","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/","title":{"rendered":"How to check if a column exists in SQL Server ?"},"content":{"rendered":"\n<p>When working with SQL Server databases, it&#8217;s common to need to check if a specific column exists in a table. For example in scenarios like database migrations, data imports, or when working with dynamic schema designs, where you typically want to check programmatically if the model is complete. Here are three methods to check if a column exists in a SQL Server table, with different T-SQL queries.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#method-1-using-the-columns-system-view-to-check-column-existence\" >Method 1: Using the Columns System View to check column existence<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#method-2-use-the-columns-and-tables-system-catalog-views\" >Method 2: Use the columns and tables system catalog views<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#method-3-use-object-id-and-col-length-functions-to-check-column-existence\" >Method 3: Use Object_ID and Col_Length functions to check column existence<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-method-1-using-the-columns-system-view-to-check-column-existence\"><span class=\"ez-toc-section\" id=\"method-1-using-the-columns-system-view-to-check-column-existence\"><\/span>Method 1: Using the Columns System View to check column existence<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This first method involves querying the <code>INFORMATION_SCHEMA.COLUMNS<\/code> system view, which <strong>contains metadata about all columns in the database<\/strong>. To check if a Sales table have the column <em>MonthName<\/em>, the SQL query would look like this one below.<\/p>\n\n\n\n<p>Note that in this query, we don&#8217;t need to specify the schema, but we execute it on the target database.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">IF EXISTS (\n   SELECT * \n   FROM   INFORMATION_SCHEMA.COLUMNS \n   WHERE  TABLE_NAME   = 'SALES' \n      AND COLUMN_NAME  = 'MonthName'\n)\nBEGIN\n    -- The column exists, add some logic here\n    PRINT 'Column exists'\nEND\nELSE\nBEGIN\n    -- The column does not exists, add some logic here\n    PRINT 'Column does not exist'\nEND\n<\/pre>\n\n\n\n<p>Of course, adapt the code by replacing <em>YourTableName<\/em> and <em>YourColumnName<\/em> with the appropriate table and column names. The result of the query above gives this in SSMS (in my case the column effectively exists in the <em>Expert-Only<\/em> <a href=\"https:\/\/cloud.google.com\/learn\/what-is-a-relational-database?hl=fr\" target=\"_blank\" rel=\"noreferrer noopener\">database<\/a>):<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1036\" height=\"571\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2023\/11\/check-if-column-exists-sql-server.jpg\" alt=\"Check if a column exists in a SQL Server database and table\" class=\"wp-image-29253\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2023\/11\/check-if-column-exists-sql-server.jpg 1036w, https:\/\/expert-only.com\/wp-content\/uploads\/2023\/11\/check-if-column-exists-sql-server-300x165.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2023\/11\/check-if-column-exists-sql-server-1024x564.jpg 1024w, https:\/\/expert-only.com\/wp-content\/uploads\/2023\/11\/check-if-column-exists-sql-server-768x423.jpg 768w\" sizes=\"auto, (max-width: 1036px) 100vw, 1036px\" \/><figcaption class=\"wp-element-caption\"><em>Check if a column exists in a SQL Server database and table<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-method-2-use-the-columns-and-tables-system-catalog-views\"><span class=\"ez-toc-section\" id=\"method-2-use-the-columns-and-tables-system-catalog-views\"><\/span>Method 2: Use the columns and tables system catalog views<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This method utilizes the SQL Server system catalog views to check for the existence of the column. It&#8217;s a more system-centric approach. <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">IF EXISTS (\nSELECT 1\nFROM    sys.columns c\n   JOIN sys.tables  t\n      ON c.object_id = t.object_id\nWHERE  t.name = 'SALES'\n   AND c.name = 'MonthName'\n)\nBEGIN\n    -- If the column exists\n    PRINT 'Column exists'\nEND\nELSE\nBEGIN\n    -- If it does not exist\n    PRINT 'Column does not exist'\nEND\n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-method-3-use-object-id-and-col-length-functions-to-check-column-existence\"><span class=\"ez-toc-section\" id=\"method-3-use-object-id-and-col-length-functions-to-check-column-existence\"><\/span>Method 3: Use Object_ID and Col_Length functions to check column existence<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>For a much more straightforward approach, you can use the <code>OBJECT_ID<\/code> and <code>COL_LENGTH<\/code> functions combined. This method is concise and effective, especially for quick checks in scripts.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"mssql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">IF COL_LENGTH('SALES', 'MonthName') IS NOT NULL\n    PRINT 'Column exists'\nELSE\n    PRINT 'Column does not exist'\n;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-combine-these-queries-with-dynamic-sql-for-larger-checks\">Combine these queries with dynamic SQL for larger checks<\/h3>\n\n\n\n<p>Each method has its own advantages, depending on the context of use and the specific requirements of your database environment. It&#8217;s always a good idea to choose the one that best fits your scenario and conforms to the best practices in your organization.<\/p>\n\n\n\n<p>I would recommend for example to include it in a <a href=\"https:\/\/expert-only.com\/en\/t-sql\/sql-server-join-operator\/\"><strong>large JOIN query<\/strong><\/a> to log in a table all the schemas, tables and column names that do not exists for better tracking. And also to add a data type check to make sure the structure is also the same. Now to go further and continue on object checking in MS SQL, here is how to <a href=\"https:\/\/expert-only.com\/en\/t-sql\/query-list-all-sql-server-tables\/\"><strong>list all SQL Server tables with one query<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-wp-embed is-provider-sql-and-it-tutorials wp-block-embed-sql-and-it-tutorials\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/expert-only.com\/en\/t-sql\/query-list-all-sql-server-tables\/\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>When working with SQL Server databases, it&#8217;s common to need to check if a specific column exists in a table. For example in scenarios like database migrations, data imports, or when working with dynamic schema designs, where you typically <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\" title=\"How to check if a column exists in SQL Server ?\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":10709,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[454],"tags":[],"class_list":{"0":"post-29244","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-t-sql"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to check if a column exists in SQL Server ? T-SQL<\/title>\n<meta name=\"description\" content=\"Check if a column exists in a specific table and database in SQL Server using 3 different methods, to combine with dynamic SQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to check if a column exists in SQL Server ?\" \/>\n<meta property=\"og:description\" content=\"Check if a column exists in a specific table and database in SQL Server using 3 different methods, to combine with dynamic SQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-15T05:22:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-18T12:33:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"How to check if a column exists in SQL Server ?\",\"datePublished\":\"2023-11-15T05:22:00+00:00\",\"dateModified\":\"2023-11-18T12:33:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\"},\"wordCount\":396,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg\",\"articleSection\":[\"T-SQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\",\"url\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\",\"name\":\"How to check if a column exists in SQL Server ? T-SQL\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg\",\"datePublished\":\"2023-11-15T05:22:00+00:00\",\"dateModified\":\"2023-11-18T12:33:00+00:00\",\"description\":\"Check if a column exists in a specific table and database in SQL Server using 3 different methods, to combine with dynamic SQL.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to check if a column exists in SQL Server ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to check if a column exists in SQL Server ? T-SQL","description":"Check if a column exists in a specific table and database in SQL Server using 3 different methods, to combine with dynamic SQL.","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:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/","og_locale":"en_US","og_type":"article","og_title":"How to check if a column exists in SQL Server ?","og_description":"Check if a column exists in a specific table and database in SQL Server using 3 different methods, to combine with dynamic SQL.","og_url":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2023-11-15T05:22:00+00:00","article_modified_time":"2023-11-18T12:33:00+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"How to check if a column exists in SQL Server ?","datePublished":"2023-11-15T05:22:00+00:00","dateModified":"2023-11-18T12:33:00+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/"},"wordCount":396,"commentCount":0,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg","articleSection":["T-SQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/","url":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/","name":"How to check if a column exists in SQL Server ? T-SQL","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg","datePublished":"2023-11-15T05:22:00+00:00","dateModified":"2023-11-18T12:33:00+00:00","description":"Check if a column exists in a specific table and database in SQL Server using 3 different methods, to combine with dynamic SQL.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/journal-and-coffee-7BF9C361150_1920x1080.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/t-sql\/check-if-column-exists-in-sql-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"How to check if a column exists in SQL Server ?"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/29244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=29244"}],"version-history":[{"count":9,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/29244\/revisions"}],"predecessor-version":[{"id":29260,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/29244\/revisions\/29260"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/10709"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=29244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=29244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=29244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}