{"id":211,"date":"2018-04-23T21:05:41","date_gmt":"2018-04-23T14:05:41","guid":{"rendered":"http:\/\/www.sqlservertutorial.net\/?page_id=211"},"modified":"2024-03-02T16:01:40","modified_gmt":"2024-03-02T09:01:40","slug":"sql-server-alias","status":"publish","type":"page","link":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/","title":{"rendered":"SQL Server Alias"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the SQL Server aliases, including column aliases and table aliases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='sql-server-column-alias'>SQL Server column alias <a href=\"#sql-server-column-alias\" class=\"anchor\" id=\"sql-server-column-alias\" title=\"Anchor for SQL Server column alias\">#<\/a><\/h2>\n\n\n\n<p>When you use the <code><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-select\/\">SELECT<\/a><\/code> statement to query data from a table, SQL Server uses the column names as the column headings for the output. For example:<\/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\">SELECT<\/span>\n    first_name,\n    last_name\n<span class=\"hljs-keyword\">FROM<\/span>\n    sales.customers\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    first_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<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"135\" height=\"170\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-alias-default-column-headings.png\" alt=\"\" class=\"wp-image-467\"\/><\/figure>\n\n\n\n<p>The output indicates that the SQL Server uses the <code>first_name<\/code> and <code>last_name<\/code> column names as the column headings respectively.<\/p>\n\n\n\n<p>To obtain the full names of customers, you can concatenate the first name, space, and the last name using the concatenation\u00a0\u00a0<code>+<\/code> operator as shown in the following query:<\/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\">SELECT<\/span>\n    first_name + <span class=\"hljs-string\">' '<\/span> + last_name\n<span class=\"hljs-keyword\">FROM<\/span>\n    sales.customers\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    first_name;<\/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<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"110\" height=\"175\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-Alias-without-alias-example.png\" alt=\"\" class=\"wp-image-226\"\/><\/figure>\n\n\n\n<p>SQL Server returns the full name column as ( <code>No column name<\/code>) which is not meaningful in this case.<\/p>\n\n\n\n<p>To assign a column or an expression a temporary name during the query execution, you use a column alias.<\/p>\n\n\n\n<p>The following illustrates the column alias syntax:<\/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\">column_name | expression  AS column_alias<\/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>In this syntax, you use the <code>AS<\/code> keyword to separate the column name or expression and the alias.<\/p>\n\n\n\n<p>Because the <code>AS<\/code> keyword is optional, you can assign an alias to a column as follows:<\/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\">column_name | expression column_alias<\/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>Back to the example above, you can rewrite the query using a column alias:<\/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\">SELECT<\/span>\n    first_name + <span class=\"hljs-string\">' '<\/span> + last_name <span class=\"hljs-keyword\">AS<\/span> full_name\n<span class=\"hljs-keyword\">FROM<\/span>\n    sales.customers\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    first_name;<\/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>Note that if the column alias contains spaces, you need to enclose it in quotation marks, as shown in the following example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span>\n    first_name + <span class=\"hljs-string\">' '<\/span> + last_name <span class=\"hljs-keyword\">AS<\/span> <span class=\"hljs-string\">'Full Name'<\/span>\n<span class=\"hljs-keyword\">FROM<\/span>\n    sales.customers\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    first_name;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><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<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"100\" height=\"175\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-Alias-column-alias-with-space-example.png\" alt=\"SQL Server Alias - column alias with space example\" class=\"wp-image-228\"\/><\/figure>\n\n\n\n<p>The following example shows how to assign an alias to a column:<\/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\"><span class=\"hljs-keyword\">SELECT<\/span>\n    category_name <span class=\"hljs-string\">'Product Category'<\/span>\n<span class=\"hljs-keyword\">FROM<\/span>\n    production.categories;<\/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<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"106\" height=\"155\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-Alias-column-alias.png\" alt=\"SQL Server Alias - column alias\" class=\"wp-image-224\"\/><\/figure>\n\n\n\n<p>In this example, the product category column alias is much more clear than the <code>category_name<\/code> column name.<\/p>\n\n\n\n<p>When you assign a column an alias, you can use either the column name or the column alias in the <code><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-order-by\/\">ORDER BY<\/a><\/code> clause as shown in the following example:<\/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\">SELECT<\/span>\n    category_name <span class=\"hljs-string\">'Product Category'<\/span>\n<span class=\"hljs-keyword\">FROM<\/span>\n    production.categories\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    category_name;  \n\n\n<span class=\"hljs-keyword\">SELECT<\/span>\n    category_name <span class=\"hljs-string\">'Product Category'<\/span>\n<span class=\"hljs-keyword\">FROM<\/span>\n    production.categories\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span>\n    <span class=\"hljs-string\">'Product Category'<\/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<p>Note that SQL Server processes the <code>ORDER BY<\/code> clause after the <code>SELECT<\/code> clause, so you can use column aliases in the <code>ORDER BY<\/code> clause.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='sql-server-table-alias'>SQL Server table alias <a href=\"#sql-server-table-alias\" class=\"anchor\" id=\"sql-server-table-alias\" title=\"Anchor for SQL Server table alias\">#<\/a><\/h2>\n\n\n\n<p>A table can be given an alias, which is known as a correlation name or range <a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-stored-procedures\/variables\/\">variable<\/a>.<\/p>\n\n\n\n<p>Similar to the column alias, you can assign a table a temporary name with or without the <code>AS<\/code> keyword:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">table_name AS table_alias\ntable_name table_alias\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><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>For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span>\n    sales.customers.customer_id,\n    first_name,\n    last_name,\n    order_id\n<span class=\"hljs-keyword\">FROM<\/span>\n    sales.customers\n<span class=\"hljs-keyword\">INNER<\/span> <span class=\"hljs-keyword\">JOIN<\/span> sales.orders <span class=\"hljs-keyword\">ON<\/span> sales.orders.customer_id = sales.customers.customer_id;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><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<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"255\" height=\"247\" src=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-Alias-table-alias.png\" alt=\"SQL Server Alias - table alias\" class=\"wp-image-225\"\/><\/figure>\n\n\n\n<p>In this example, both the <code>customers<\/code> and the <code>orders<\/code> tables have a\u00a0column with the same name <code>customer_id<\/code>, so you need to refer to the column using the following syntax:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">table_name.column_name<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><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>such as:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">sales.custoners.customer_id\nsales.orders.customer_id\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><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 don&#8217;t do so, the SQL server will issue an error.<\/p>\n\n\n\n<p>The query above is quite difficult to read. Fortunately, you can improve its readability by using the table alias as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span>\n    c.customer_id,\n    first_name,\n    last_name,\n    order_id\n<span class=\"hljs-keyword\">FROM<\/span>\n    sales.customers c\n<span class=\"hljs-keyword\">INNER<\/span> <span class=\"hljs-keyword\">JOIN<\/span> sales.orders o <span class=\"hljs-keyword\">ON<\/span> o.customer_id = c.customer_id;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><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 query, <code>c<\/code> is the alias for the <code>sales.customers<\/code> table and <code>o<\/code> is the alias for the <code>sales.orders<\/code> table.<\/p>\n\n\n\n<p>When you assign an alias to a table, you must use the alias to refer to the table column. Otherwise, SQL Server will issue an error.<\/p>\n\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>A column alias is a temporary name assigned to a column or an expression in a query&#8217;s result set.<\/li>\n\n\n\n<li>Use a column alias to rename the output of a column or an expression to make it more meaningful.<\/li>\n\n\n\n<li>A table alias is a shorthand or temporary name assigned to a table in a query.<\/li>\n\n\n\n<li>Use table aliases when joining multiple tables or when referencing the same table more than once in a query.<\/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=\"211\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/\"\n\t\t\t\tdata-post-title=\"SQL Server Alias\"\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=\"211\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/\"\n\t\t\t\tdata-post-title=\"SQL Server Alias\"\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>Iin this tutorial, you will learn how to use the SQL Server alias including column alias and table alias.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":100,"menu_order":12,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-211","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 Alias<\/title>\n<meta name=\"description\" content=\"This tutorial introduces you to the SQL Server alias including column alias and table alias.\" \/>\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-alias\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server Alias\" \/>\n<meta property=\"og:description\" content=\"This tutorial introduces you to the SQL Server alias including column alias and table alias.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Server Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-02T09:01:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-alias-default-column-headings.png\" \/>\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=\"4 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-alias\\\/\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alias\\\/\",\"name\":\"SQL Server Alias\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alias\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alias\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/wp-content\\\/uploads\\\/SQL-Server-alias-default-column-headings.png\",\"datePublished\":\"2018-04-23T14:05:41+00:00\",\"dateModified\":\"2024-03-02T09:01:40+00:00\",\"description\":\"This tutorial introduces you to the SQL Server alias including column alias and table alias.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alias\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alias\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alias\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/wp-content\\\/uploads\\\/SQL-Server-alias-default-column-headings.png\",\"contentUrl\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/wp-content\\\/uploads\\\/SQL-Server-alias-default-column-headings.png\",\"width\":135,\"height\":170},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-basics\\\/sql-server-alias\\\/#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 Alias\"}]},{\"@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 Alias","description":"This tutorial introduces you to the SQL Server alias including column alias and table alias.","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-alias\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server Alias","og_description":"This tutorial introduces you to the SQL Server alias including column alias and table alias.","og_url":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/","og_site_name":"SQL Server Tutorial","article_modified_time":"2024-03-02T09:01:40+00:00","og_image":[{"url":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-alias-default-column-headings.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/","url":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/","name":"SQL Server Alias","isPartOf":{"@id":"https:\/\/www.sqlservertutorial.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-alias-default-column-headings.png","datePublished":"2018-04-23T14:05:41+00:00","dateModified":"2024-03-02T09:01:40+00:00","description":"This tutorial introduces you to the SQL Server alias including column alias and table alias.","breadcrumb":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/#primaryimage","url":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-alias-default-column-headings.png","contentUrl":"https:\/\/www.sqlservertutorial.net\/wp-content\/uploads\/SQL-Server-alias-default-column-headings.png","width":135,"height":170},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-basics\/sql-server-alias\/#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 Alias"}]},{"@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\/211","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=211"}],"version-history":[{"count":2,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/211\/revisions"}],"predecessor-version":[{"id":3412,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/211\/revisions\/3412"}],"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=211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}