{"id":1964,"date":"2019-05-04T10:32:08","date_gmt":"2019-05-04T03:32:08","guid":{"rendered":"http:\/\/www.sqlservertutorial.net\/?page_id=1964"},"modified":"2024-07-31T15:38:56","modified_gmt":"2024-07-31T08:38:56","slug":"sql-server-alter-schema","status":"publish","type":"page","link":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/","title":{"rendered":"SQL Server ALTER SCHEMA"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the SQL Server <code>ALTER SCHEMA<\/code> statement to transfer a securable from one schema to another.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='sql-server-alter-schema-statement-overview'>SQL Server ALTER SCHEMA statement overview <a href=\"#sql-server-alter-schema-statement-overview\" class=\"anchor\" id=\"sql-server-alter-schema-statement-overview\" title=\"Anchor for SQL Server ALTER SCHEMA statement overview\">#<\/a><\/h2>\n\n\n\n<p>The <code>ALTER SCHEMA<\/code> statement allows you to transfer a securable from one schema to another within the same database.<\/p>\n\n\n\n<p class=\"note\">Note that a securable is a resource to which the Database Engine authorization system controls access. For instance, a table is a securable.<\/p>\n\n\n\n<p>The following shows the syntax of the <code>ALTER SCHEMA<\/code> statement:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">ALTER<\/span> <span class=\"hljs-keyword\">SCHEMA<\/span> target_schema_name   \n    TRANSFER &#91; entity_type :: ] securable_name;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this syntax:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>target_schema_name<\/code> is the name of a schema in the current database, into which you want to move the object. Note that it cannot be <code>SYS<\/code> or <code>INFORMATION_SCHEMA<\/code>.<\/li>\n\n\n\n<li>The <code>entity_type<\/code> can be <code>Object<\/code>, <code>Type<\/code>, or XML Schema Collection. It defaults to <code>Object<\/code>. The <code>entity_type<\/code> represents the class of the entity for which the owner is being changed.<\/li>\n\n\n\n<li><code>object_name<\/code> is the name of the securable that you want to move into the <code>target_schema_name<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>If you move a <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-stored-procedures\/\">stored procedure<\/a>, <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-user-defined-functions\/\">function<\/a>, <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-views\/\">view<\/a>, or <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-triggers\/\">trigger<\/a>, SQL Server will not change the schema name of these securables. Therefore, it is recommended that you drop and re-create these objects in the new schema instead of using the <code>ALTER SCHEMA<\/code> statement for moving.<\/p>\n\n\n\n<p>If you move an object e.g., table or synonym, SQL Server will not update the references for these objects automatically. You must manually modify the references to reflect the new schema name. <\/p>\n\n\n\n<p>For example, if you move a table referenced in a <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-stored-procedures\/\">stored procedure<\/a>, you need to change the stored procedure to reflect the new schema name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='sql-server-alter-schema-statement-example'>SQL Server ALTER SCHEMA statement example <a href=\"#sql-server-alter-schema-statement-example\" class=\"anchor\" id=\"sql-server-alter-schema-statement-example\" title=\"Anchor for SQL Server ALTER SCHEMA statement example\">#<\/a><\/h2>\n\n\n\n<p>First, <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-create-table\/\">create a new table<\/a> named <code>offices<\/code> in the <code>dbo<\/code> schema:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">TABLE<\/span> dbo.offices\n(\n    office_id      <span class=\"hljs-built_in\">INT<\/span>\n    PRIMARY <span class=\"hljs-keyword\">KEY<\/span> <span class=\"hljs-keyword\">IDENTITY<\/span>, \n    office_name    <span class=\"hljs-keyword\">NVARCHAR<\/span>(<span class=\"hljs-number\">40<\/span>) <span class=\"hljs-keyword\">NOT<\/span> <span class=\"hljs-literal\">NULL<\/span>, \n    office_address <span class=\"hljs-keyword\">NVARCHAR<\/span>(<span class=\"hljs-number\">255<\/span>) <span class=\"hljs-keyword\">NOT<\/span> <span class=\"hljs-literal\">NULL<\/span>, \n    phone          <span class=\"hljs-built_in\">VARCHAR<\/span>(<span class=\"hljs-number\">20<\/span>),\n);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Next, <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-insert\/\">insert<\/a> some rows into the <code>dob.offices<\/code> table:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">INSERT<\/span> <span class=\"hljs-keyword\">INTO<\/span> \n    dbo.offices(office_name, office_address)\n<span class=\"hljs-keyword\">VALUES<\/span>\n    (<span class=\"hljs-string\">'Silicon Valley'<\/span>,<span class=\"hljs-string\">'400 North 1st Street, San Jose, CA 95130'<\/span>),\n    (<span class=\"hljs-string\">'Sacramento'<\/span>,<span class=\"hljs-string\">'1070 River Dr., Sacramento, CA 95820'<\/span>);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Then, <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-stored-procedures\/basic-sql-server-stored-procedures\/\">create a stored procedure<\/a> that finds the office by an ID:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> PROC usp_get_office_by_id(\n    @<span class=\"hljs-keyword\">id<\/span> <span class=\"hljs-built_in\">INT<\/span>\n) <span class=\"hljs-keyword\">AS<\/span>\n<span class=\"hljs-keyword\">BEGIN<\/span>\n    <span class=\"hljs-keyword\">SELECT<\/span> \n        * \n    <span class=\"hljs-keyword\">FROM<\/span> \n        dbo.offices\n    <span class=\"hljs-keyword\">WHERE<\/span> \n        office_id = @<span class=\"hljs-keyword\">id<\/span>;\n<span class=\"hljs-keyword\">END<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>After that, transfer this <code>dbo.offices<\/code> table to the <code>sales<\/code> schema:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">ALTER<\/span> <span class=\"hljs-keyword\">SCHEMA<\/span> sales TRANSFER <span class=\"hljs-keyword\">OBJECT<\/span>::dbo.offices;  <\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>If you execute the <code>usp_get_office_by_id<\/code> stored procedure:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css\"><span class=\"hljs-selector-tag\">exec<\/span> <span class=\"hljs-selector-tag\">usp_get_office_by_id<\/span> <span class=\"hljs-keyword\">@id<\/span>=1;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>SQL Server will issue an error:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">Msg 208, Level 16, State 1, Procedure usp_get_office_by_id, Line 5 &#91;Batch <span class=\"hljs-keyword\">Start<\/span> Line <span class=\"hljs-number\">30<\/span>]\nInvalid <span class=\"hljs-keyword\">object<\/span> <span class=\"hljs-keyword\">name<\/span> <span class=\"hljs-string\">'dbo.offices'<\/span>.<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Finally, manually modify the <code>dbo.offices<\/code> to <code>sales.offices<\/code> inside the stored procedure to reflect the new schema:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> PROC usp_get_office_by_id(\n    @<span class=\"hljs-keyword\">id<\/span> <span class=\"hljs-built_in\">INT<\/span>\n) <span class=\"hljs-keyword\">AS<\/span>\n<span class=\"hljs-keyword\">BEGIN<\/span>\n    <span class=\"hljs-keyword\">SELECT<\/span> \n        * \n    <span class=\"hljs-keyword\">FROM<\/span> \n        sales.offices\n    <span class=\"hljs-keyword\">WHERE<\/span> \n        office_id = @<span class=\"hljs-keyword\">id<\/span>;\n<span class=\"hljs-keyword\">END<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the SQL Server <code>ALTER SCHEMA<\/code> statement to transfer a securable from one schema to another within the same database.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"1964\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/\"\n\t\t\t\tdata-post-title=\"SQL Server ALTER SCHEMA\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"1964\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/\"\n\t\t\t\tdata-post-title=\"SQL Server ALTER SCHEMA\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows you how to use the SQL Server ALTER SCHEMA to transfer a securable from one schema to another within the same database.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":100,"menu_order":49,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1964","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SQL Server ALTER SCHEMA Statement<\/title>\n<meta name=\"description\" content=\"This tutorial shows you how to use the SQL Server ALTER SCHEMA to transfer a securable from one schema to another within the same database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server ALTER SCHEMA Statement\" \/>\n<meta property=\"og:description\" content=\"This tutorial shows you how to use the SQL Server ALTER SCHEMA to transfer a securable from one schema to another within the same database.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Server Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-31T08:38:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alter-schema\\\/\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alter-schema\\\/\",\"name\":\"SQL Server ALTER SCHEMA Statement\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/#website\"},\"datePublished\":\"2019-05-04T03:32:08+00:00\",\"dateModified\":\"2024-07-31T08:38:56+00:00\",\"description\":\"This tutorial shows you how to use the SQL Server ALTER SCHEMA to transfer a securable from one schema to another within the same database.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alter-schema\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alter-schema\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alter-schema\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server Basics\",\"item\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SQL Server ALTER SCHEMA\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/#website\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/\",\"name\":\"SQL Server Tutorial\",\"description\":\"The Practical SQL Server Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server ALTER SCHEMA Statement","description":"This tutorial shows you how to use the SQL Server ALTER SCHEMA to transfer a securable from one schema to another within the same database.","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:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server ALTER SCHEMA Statement","og_description":"This tutorial shows you how to use the SQL Server ALTER SCHEMA to transfer a securable from one schema to another within the same database.","og_url":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/","og_site_name":"SQL Server Tutorial","article_modified_time":"2024-07-31T08:38:56+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/","url":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/","name":"SQL Server ALTER SCHEMA Statement","isPartOf":{"@id":"https:\/\/www.sqlservertutorial.net\/#website"},"datePublished":"2019-05-04T03:32:08+00:00","dateModified":"2024-07-31T08:38:56+00:00","description":"This tutorial shows you how to use the SQL Server ALTER SCHEMA to transfer a securable from one schema to another within the same database.","breadcrumb":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alter-schema\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlservertutorial.net\/"},{"@type":"ListItem","position":2,"name":"SQL Server Basics","item":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/"},{"@type":"ListItem","position":3,"name":"SQL Server ALTER SCHEMA"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlservertutorial.net\/#website","url":"https:\/\/www.sqlservertutorial.net\/","name":"SQL Server Tutorial","description":"The Practical SQL Server Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlservertutorial.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/1964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/comments?post=1964"}],"version-history":[{"count":3,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/1964\/revisions"}],"predecessor-version":[{"id":4453,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/1964\/revisions\/4453"}],"up":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/100"}],"wp:attachment":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/media?parent=1964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}