{"id":20750,"date":"2021-01-13T10:52:23","date_gmt":"2021-01-13T18:52:23","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=20750"},"modified":"2023-12-01T04:08:03","modified_gmt":"2023-12-01T12:08:03","slug":"sql-alias","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/sql-alias\/","title":{"rendered":"SQL Aliases: A Complete Guide"},"content":{"rendered":"\n<p><em>An SQL alias is a reference name for a table or a column. They are used to shorten your queries if you have long table names. Both table and column aliases are defined using the AS keyword. An alias lasts until a query has executed. Aliases are not permanent.<\/em><\/p>\n\n\n\n<p>Have you ever become tired of writing out long column or table names in a complex query? It happens as you learn more about SQL. This is where aliases come to the rescue. An alias will help you shorten your query.<\/p>\n\n\n\n<p>In this guide, we talk about what SQL aliases are and why they are used. We walk through two scenarios of an alias in action to help you understand how to use SQL aliases. Without further ado, let\u2019s begin!<\/p>\n\n\n\n<p><em>Note: This tutorial has been written using PostgreSQL.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is an SQL Alias?<\/h2>\n\n\n\n<p>An SQL alias is like human a human alias. The SQL alias assigns a placeholder name to a table or a column in a table. Aliases are useful because they help make queries and their results more readable and easier to interpret.<\/p>\n\n\n\n<p>A good alias is one that can be understood as quickly as possible.<\/p>\n\n\n\n<p>The alias <em>n<\/em> would be confusing to describe a column called <em>name<\/em> if there was also a column called <em>number_of_products.<\/em> Both start with the letter <em>n<\/em>.<\/p>\n\n\n\n<p><em>fn<\/em> may be more appropriate because it takes the first letter of each word in <em>full name<\/em>. This alias is less likely to cause confusion.<\/p>\n\n\n\n<p>Remember that your SQL queries may be used by someone else, not just yourself. You should make every effort to make your queries as intuitive as possible for all readers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL Aliases: Columns<\/h2>\n\n\n\n<p>You use aliases on column names. Column name aliases lets you change the name of a column in the output of a query.<\/p>\n\n\n\n<p>Let\u2019s take a look at two tables in our example database. These databases are called <em>employees<\/em> and <em>branches<\/em>.<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td><strong>Employees<\/strong><\/td><td><br><\/td><td><strong>Branches<\/strong><\/td><\/tr><tr><td>name<\/td><td>title<\/td><td>branch_id<\/td><td>salary<\/td><td><br><\/td><td>branch_id<\/td><td>branch_name<\/td><\/tr><tr><td>Geoff<\/td><td>Senior Sales Associate<\/td><td>1<\/td><td>38000<\/td><td><br><\/td><td>1<\/td><td>San Francisco<\/td><\/tr><tr><td>Adam<\/td><td>Senior Sales Associate<\/td><td>2<\/td><td>38000<\/td><td><br><\/td><td>2<\/td><td>Cambridge<\/td><\/tr><tr><td>Emma<\/td><td>Marketing Executive<\/td><td>2<\/td><td>50000<\/td><td><br><\/td><td>3<\/td><td>Los Angeles<\/td><\/tr><tr><td>Luke<\/td><td>Marketing Assistant<\/td><td>3<\/td><td>32000<\/td><td><br><\/td><td><br><\/td><td><br><\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>The employees table has four columns and four rows. The branches table has two columns and three rows.<\/p>\n\n\n\n<p>Let\u2019s write an <a href=\"https:\/\/careerkarma.com\/blog\/sql-select\/\"><\/a><a href=\"https:\/\/careerkarma.com\/blog\/sql-select\/\">SQL SELECT s<\/a><a href=\"https:\/\/careerkarma.com\/blog\/sql-select\/\">tatement<\/a> that tells us the highest salary earned at each branch:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>SELECT branches.branch_name, MAX(employees.salary)\nFROM employees LEFT JOIN branches\nON employees.branch_id = branches.branch_id\nGROUP BY branches.branch_name;<\/pre><\/div>\n\n\n\n<p>We use the <a href=\"https:\/\/careerkarma.com\/blog\/sql-aggregate-functions\/\">MAX() SQL aggregate function<\/a> to select the highest value in the \u201csalary\u201d column of the \u201cemployees\u201d table. We use an <a href=\"https:\/\/careerkarma.com\/blog\/sql-left-join\/\">SQLLEFT JOIN statement<\/a> to connect the \u201cbranches\u201d and \u201cemployees\u201d tables together. This lets us see the return of each branch.<\/p>\n\n\n\n<p>Let\u2019s see what our query returns:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td><strong>branch_name<\/strong><\/td><td><strong>max<\/strong><\/td><\/tr><tr><td>San Francisco<\/td><td>38000<\/td><\/tr><tr><td>Los Angeles<\/td><td>32000<\/td><\/tr><tr><td>Cambridge<\/td><td>50000<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Our query works. The title names of our query are not very intuitive. For someone who does not write this, query \u201cmax\u201d may be confusing.<\/p>\n\n\n\n<p>We solve this by specifying column alias names:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>SELECT branches.branch_name AS &quot;Branch Name&quot;, MAX(employees.salary) as &quot;Highest Salary&quot;\nFROM employees LEFT JOIN branches\nON employees.branch_id = branches.branch_id\nGROUP BY branches.branch_name;<\/pre><\/div>\n\n\n\n<p>We specify two aliases. \u201cbranch_name\u201d gets the alias \u201cBranch Name\u201d. Our MAX() aggregate function gets the alias \u201cHighest Salary\u201d. Let\u2019s run our query again:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td><strong>Branch Name<\/strong><\/td><td><strong>Highest Salary<\/strong><\/td><\/tr><tr><td>San Francisco<\/td><td>38000<\/td><\/tr><tr><td>Los Angeles<\/td><td>32000<\/td><\/tr><tr><td>Cambridge<\/td><td>50000<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>The returning rows by our query are the same. The table headings change. Now, \u201cbranch_name\u201d is \u201cBranch Name\u201d and \u201cmax\u201d is \u201cHighest Salary\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SQL Aliases: Tables<\/h2>\n\n\n\n<p>You can define an SQL alias on a table. This is useful if you are going to refer to a table many times in a query. Such an event often happens in more complex queries.<\/p>\n\n\n\n<p>When you query multiple tables, you need to specify the name of each table before the name of the columns. The table and column name are separated with a period (.). This ensures SQL knows exactly which table each statement refers to in your query.<\/p>\n\n\n\n<p>While this feature protects you from making your queries ambiguous, it makes them less readable.&nbsp;Thus, you should make sure your aliases are not too difficult to understand.<\/p>\n\n\n\n<p>Let\u2019s write a query that returns the name of every employee alongside the name of the branch at which they work:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>SELECT employees.name, branches.branch_name\nFROM employees LEFT JOIN branches\nON employees.branch_id = branches.branch_id;<\/pre><\/div>\n\n\n\n<p>Our query returns:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td><strong>name<\/strong><\/td><td><strong>branch_name<\/strong><\/td><\/tr><tr><td>Geoff<\/td><td>San Francisco<\/td><\/tr><tr><td>Adam<\/td><td>Cambridge<\/td><\/tr><tr><td>Emma<\/td><td>Cambridge<\/td><\/tr><tr><td>Luke<\/td><td>Los Angeles<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>We query two tables: employees and branches. We use a LEFT JOIN to connect the value of \u201cbranch_id\u201d in both tables. This allows us to see the names of each branch with which an employee is associated.<\/p>\n\n\n\n<p>Our query is quite long. We repeat the words \u201cemployees\u201d and \u201cbranches\u201d twice. In a longer query, we have to use these words even more.<\/p>\n\n\n\n<p>We use aliases to make our query shorter. We need to use the AS keyword to create a table name as an alias in an SQL query:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>SELECT e.name, b.branch_name\nFROM employees AS e LEFT JOIN branches AS b\nON e.branch_id = b.branch_id;<\/pre><\/div>\n\n\n\n<p>This query returns the same output as our first query.<\/p>\n\n\n\n<p>We assign two aliases:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u201cemployees\u201d is \u201cem\u201d<\/li><li>\u201cbranches\u201d is \u201cbr\u201d<\/li><\/ul>\n\n\n\n<p>Any time we refer to <em>em<\/em> or <em>br<\/em> in our query, SQL treats it as if we are referring to \u201cemployees\u201d and \u201cbranches\u201d, respectively. Our table aliases allow us to reduce the amount of repetition in our SQL statement.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>An SQL alias is a substitute name for a column or table. Aliases are query-specific. This means that an alias in one query cannot be used in another query without redefining the alias. An alias is set using the AS keyword.<\/p>\n\n\n\n<p>Are you interested in learning more about SQL? Check out our <a href=\"https:\/\/careerkarma.com\/blog\/learn-sql\/\">How to Learn SQL guide<\/a>. This comprehensive guide covers everything from what courses you should consider to helpful online SQL resources.<\/p>\n","protected":false},"excerpt":{"rendered":"An SQL alias is a reference name for a table or a column. They are used to shorten your queries if you have long table names. Both table and column aliases are defined using the AS keyword. An alias lasts until a query has executed. Aliases are not permanent. Have you ever become tired of&hellip;","protected":false},"author":240,"featured_media":20751,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17284],"tags":[],"class_list":{"0":"post-20750","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-sql"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"SQL","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Aliases: A Complete Guide: A Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"SQL aliases allow you to assign temporary names to tables and columns in a database query. On Career Karma, learn how to use SQL aliases.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/sql-alias\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Aliases: A Complete Guide\" \/>\n<meta property=\"og:description\" content=\"SQL aliases allow you to assign temporary names to tables and columns in a database query. On Career Karma, learn how to use SQL aliases.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/sql-alias\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-13T18:52:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:08:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"574\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"SQL Aliases: A Complete Guide\",\"datePublished\":\"2021-01-13T18:52:23+00:00\",\"dateModified\":\"2023-12-01T12:08:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/\"},\"wordCount\":919,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg\",\"articleSection\":[\"SQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/sql-alias\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/\",\"name\":\"SQL Aliases: A Complete Guide: A Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg\",\"datePublished\":\"2021-01-13T18:52:23+00:00\",\"dateModified\":\"2023-12-01T12:08:03+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"SQL aliases allow you to assign temporary names to tables and columns in a database query. On Career Karma, learn how to use SQL aliases.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/sql-alias\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg\",\"width\":1020,\"height\":574},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/sql-alias\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL\",\"item\":\"https:\/\/careerkarma.com\/blog\/sql\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SQL Aliases: A Complete Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Aliases: A Complete Guide: A Complete Guide | Career Karma","description":"SQL aliases allow you to assign temporary names to tables and columns in a database query. On Career Karma, learn how to use SQL aliases.","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:\/\/careerkarma.com\/blog\/sql-alias\/","og_locale":"en_US","og_type":"article","og_title":"SQL Aliases: A Complete Guide","og_description":"SQL aliases allow you to assign temporary names to tables and columns in a database query. On Career Karma, learn how to use SQL aliases.","og_url":"https:\/\/careerkarma.com\/blog\/sql-alias\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2021-01-13T18:52:23+00:00","article_modified_time":"2023-12-01T12:08:03+00:00","og_image":[{"width":1020,"height":574,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"SQL Aliases: A Complete Guide","datePublished":"2021-01-13T18:52:23+00:00","dateModified":"2023-12-01T12:08:03+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/"},"wordCount":919,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg","articleSection":["SQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/sql-alias\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/","url":"https:\/\/careerkarma.com\/blog\/sql-alias\/","name":"SQL Aliases: A Complete Guide: A Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg","datePublished":"2021-01-13T18:52:23+00:00","dateModified":"2023-12-01T12:08:03+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"SQL aliases allow you to assign temporary names to tables and columns in a database query. On Career Karma, learn how to use SQL aliases.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/sql-alias\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/08\/irvan-smith-cwqG1N1AtI0-unsplash.jpg","width":1020,"height":574},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/sql-alias\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL","item":"https:\/\/careerkarma.com\/blog\/sql\/"},{"@type":"ListItem","position":3,"name":"SQL Aliases: A Complete Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=20750"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20750\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/20751"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=20750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=20750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=20750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}