{"id":519,"date":"2012-09-14T12:00:29","date_gmt":"2012-09-14T12:00:29","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=519"},"modified":"2022-02-17T07:14:04","modified_gmt":"2022-02-17T07:14:04","slug":"increase-the-size-of-a-nvarchar-column","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/sql-server\/queries-microsoft-sql-server\/alter\/increase-the-size-of-a-nvarchar-column","title":{"rendered":"Increase the size of a nvarchar column"},"content":{"rendered":"<pre><code>\r\n\t\/\/Increase the size of the TagName column\r\n\ttry\r\n\t{\r\n\t\tSqlCommand1 = gcnew SqlClient::SqlCommand();\r\n\t\tSqlCommand1-&gt;Connection = SqlConnection1;\r\n\t\tSqlCommand1-&gt;CommandType = CommandType::Text;\r\n\t\tSqlCommand1-&gt;CommandText = \"ALTER TABLE tblTagDefinitions ALTER COLUMN TagName [nvarchar](200) NULL\";\r\n\t\taffected = SqlCommand1-&gt;ExecuteNonQuery();\t\t\/\/affected = number of rows affected\r\n\t}\r\n\tcatch (Exception ^)\r\n\t{\r\n\t}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/Increase the size of the TagName column try { SqlCommand1 = gcnew SqlClient::SqlCommand(); SqlCommand1-&gt;Connection = SqlConnection1; SqlCommand1-&gt;CommandType = CommandType::Text; SqlCommand1-&gt;CommandText = &#8220;ALTER TABLE tblTagDefinitions ALTER COLUMN TagName [nvarchar](200) NULL&#8221;; affected = SqlCommand1-&gt;ExecuteNonQuery(); \/\/affected = number of rows affected } catch (Exception ^) { }<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-519","post","type-post","status-publish","format-standard","hentry","category-alter"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=519"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/519\/revisions"}],"predecessor-version":[{"id":1423,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/519\/revisions\/1423"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}