Is the keyword “ALIAS” actually used?












2















According to the Postgres documentation for every version from 7.1 through 9.1, 'ALIAS' is listed as a reserved word, at least for SQL99. Later versions do not show it - suggesting that it has been dropped as a reserved word. When aliasing a table or column one may use 'AS', but I have never seen the word 'ALIAS' used anywhere - not for Postgres, SQL Server or any other RDBMS I have encountered. The Postgres docs do say "the presence of a key word does not indicate the existence of a feature." Is it as simple as that - that someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it? Or is there a case where the word itself is or was actually used (and possibly required) and I simply have never stumbled over it?










share|improve this question

























  • SQL-92 mentions it as a potential future reserved word. contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

    – Martin Smith
    1 hour ago






  • 1





    So based on the feedback and research into the older specs (mostly by Evan) it looks like the answer actually is "someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it" (except DB2). The bottom line for me is that it is not reserved now in any of the RDBMS I expect to be using.

    – mickeyf
    42 mins ago
















2















According to the Postgres documentation for every version from 7.1 through 9.1, 'ALIAS' is listed as a reserved word, at least for SQL99. Later versions do not show it - suggesting that it has been dropped as a reserved word. When aliasing a table or column one may use 'AS', but I have never seen the word 'ALIAS' used anywhere - not for Postgres, SQL Server or any other RDBMS I have encountered. The Postgres docs do say "the presence of a key word does not indicate the existence of a feature." Is it as simple as that - that someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it? Or is there a case where the word itself is or was actually used (and possibly required) and I simply have never stumbled over it?










share|improve this question

























  • SQL-92 mentions it as a potential future reserved word. contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

    – Martin Smith
    1 hour ago






  • 1





    So based on the feedback and research into the older specs (mostly by Evan) it looks like the answer actually is "someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it" (except DB2). The bottom line for me is that it is not reserved now in any of the RDBMS I expect to be using.

    – mickeyf
    42 mins ago














2












2








2








According to the Postgres documentation for every version from 7.1 through 9.1, 'ALIAS' is listed as a reserved word, at least for SQL99. Later versions do not show it - suggesting that it has been dropped as a reserved word. When aliasing a table or column one may use 'AS', but I have never seen the word 'ALIAS' used anywhere - not for Postgres, SQL Server or any other RDBMS I have encountered. The Postgres docs do say "the presence of a key word does not indicate the existence of a feature." Is it as simple as that - that someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it? Or is there a case where the word itself is or was actually used (and possibly required) and I simply have never stumbled over it?










share|improve this question
















According to the Postgres documentation for every version from 7.1 through 9.1, 'ALIAS' is listed as a reserved word, at least for SQL99. Later versions do not show it - suggesting that it has been dropped as a reserved word. When aliasing a table or column one may use 'AS', but I have never seen the word 'ALIAS' used anywhere - not for Postgres, SQL Server or any other RDBMS I have encountered. The Postgres docs do say "the presence of a key word does not indicate the existence of a feature." Is it as simple as that - that someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it? Or is there a case where the word itself is or was actually used (and possibly required) and I simply have never stumbled over it?







postgresql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 42 mins ago







mickeyf

















asked 3 hours ago









mickeyfmickeyf

254138




254138













  • SQL-92 mentions it as a potential future reserved word. contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

    – Martin Smith
    1 hour ago






  • 1





    So based on the feedback and research into the older specs (mostly by Evan) it looks like the answer actually is "someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it" (except DB2). The bottom line for me is that it is not reserved now in any of the RDBMS I expect to be using.

    – mickeyf
    42 mins ago



















  • SQL-92 mentions it as a potential future reserved word. contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

    – Martin Smith
    1 hour ago






  • 1





    So based on the feedback and research into the older specs (mostly by Evan) it looks like the answer actually is "someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it" (except DB2). The bottom line for me is that it is not reserved now in any of the RDBMS I expect to be using.

    – mickeyf
    42 mins ago

















SQL-92 mentions it as a potential future reserved word. contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

– Martin Smith
1 hour ago





SQL-92 mentions it as a potential future reserved word. contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt

– Martin Smith
1 hour ago




1




1





So based on the feedback and research into the older specs (mostly by Evan) it looks like the answer actually is "someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it" (except DB2). The bottom line for me is that it is not reserved now in any of the RDBMS I expect to be using.

– mickeyf
42 mins ago





So based on the feedback and research into the older specs (mostly by Evan) it looks like the answer actually is "someone thought "oh we'd better make this reserved because it looks like we might want to use it" but no one ever did use it" (except DB2). The bottom line for me is that it is not reserved now in any of the RDBMS I expect to be using.

– mickeyf
42 mins ago










2 Answers
2






active

oldest

votes


















5















According to the Postgres (and other) documentation, 'ALIAS' is listed as a reserved word, at least for SQL99.




That's not true. PostgreSQL maintains a list of reserved and non-reserved terms in the appendix. ALIAS is absent from that list. You can verify PostgreSQL does not use ALIAS by checking out the YACC grammar. Even as far back as Postgres95 ALIAS was not a reserved word You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word




  • 👍 MySQL does NOT reserve ALIAS

  • 👍 Oracle does NOT reserve ALIAS

  • 👎 SQL Server does (in T-SQL) reserve ALIAS


SQL Standard




  • In SQL-92, ALIAS was marked as a <reserved word>; but, there was no use assigned for that <reserved word>.


  • In SQL-99 ALIAS was marked as an "Additional Reserved Word", and added to the list of <reserved word>; but, there was no use assigned for that <reserved word>. Perhaps they reserved the term with the intent to define meaning later, and then withdrew it at a different point. Or, perhaps they reserved the term for vendor defined implementation. PostgreSQL reflected the spec's reservation in the docs, and then removed that reservation with the spec.


  • In SQL-2011, ALIAS is no where to be found and the word "alias" only appears in reference to 'Feature T053, “Explicit aliases for all-fields reference”'



ℹ There is no digitized copy of SQL-86, or SQL-89






share|improve this answer


























  • postgresql.org/docs/7.3/sql-keywords-appendix.html shows that at least some versions of Postgres did consider it a reserved word. Up through 8.something I believe. I did mention that it appeared to have been dropped as a reserved word in later versions. I did not mention SQL-2011, but older specs.

    – mickeyf
    2 hours ago











  • @mickeyf that doc is wrong, perhaps it was never upgraded when Postgres moved from QUEL to SQL ~1994. You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word, github.com/postgres/postgres/blob/…

    – Evan Carroll
    1 hour ago











  • Carrol - I have no reasonable way of checking the accuracy of the documentation. But the same page of the documentation for every version from 7.1 through 9.1 all indicate that it is a reserved word (but only for SQL99), and they do not omit it from the reserved word list until 9.2. Version 9.1 was released in 2011. So it took them all that time to correct the documentation? I suppose that's at least as plausible as that it was reserved and then 'un-reserved'. I've always had the impression the Postgres was much better than average as far as documentation went. Iconoclast!

    – mickeyf
    1 hour ago













  • @mickeyf see my update.

    – Evan Carroll
    1 hour ago



















3














It is used at least in various flavours of Db2: ALIAS is an object that allows you to specify a different name for another object, like table. It's frequently used to allow references in one schema to objects in another schema without explicitly specifying that schema.



create table SOMEOTHERSCHEMA.FOOBAR (...);
set schema MYSCHEMA;
create alias FOOBAR for SOMEOTHERSCHEMA.FOOBAR;
select * from FOOBAR;


ALIAS is an alias for SYNONYM; the latter concept also exists in Oracle and SQL Server.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f227095%2fis-the-keyword-alias-actually-used%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    5















    According to the Postgres (and other) documentation, 'ALIAS' is listed as a reserved word, at least for SQL99.




    That's not true. PostgreSQL maintains a list of reserved and non-reserved terms in the appendix. ALIAS is absent from that list. You can verify PostgreSQL does not use ALIAS by checking out the YACC grammar. Even as far back as Postgres95 ALIAS was not a reserved word You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word




    • 👍 MySQL does NOT reserve ALIAS

    • 👍 Oracle does NOT reserve ALIAS

    • 👎 SQL Server does (in T-SQL) reserve ALIAS


    SQL Standard




    • In SQL-92, ALIAS was marked as a <reserved word>; but, there was no use assigned for that <reserved word>.


    • In SQL-99 ALIAS was marked as an "Additional Reserved Word", and added to the list of <reserved word>; but, there was no use assigned for that <reserved word>. Perhaps they reserved the term with the intent to define meaning later, and then withdrew it at a different point. Or, perhaps they reserved the term for vendor defined implementation. PostgreSQL reflected the spec's reservation in the docs, and then removed that reservation with the spec.


    • In SQL-2011, ALIAS is no where to be found and the word "alias" only appears in reference to 'Feature T053, “Explicit aliases for all-fields reference”'



    ℹ There is no digitized copy of SQL-86, or SQL-89






    share|improve this answer


























    • postgresql.org/docs/7.3/sql-keywords-appendix.html shows that at least some versions of Postgres did consider it a reserved word. Up through 8.something I believe. I did mention that it appeared to have been dropped as a reserved word in later versions. I did not mention SQL-2011, but older specs.

      – mickeyf
      2 hours ago











    • @mickeyf that doc is wrong, perhaps it was never upgraded when Postgres moved from QUEL to SQL ~1994. You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word, github.com/postgres/postgres/blob/…

      – Evan Carroll
      1 hour ago











    • Carrol - I have no reasonable way of checking the accuracy of the documentation. But the same page of the documentation for every version from 7.1 through 9.1 all indicate that it is a reserved word (but only for SQL99), and they do not omit it from the reserved word list until 9.2. Version 9.1 was released in 2011. So it took them all that time to correct the documentation? I suppose that's at least as plausible as that it was reserved and then 'un-reserved'. I've always had the impression the Postgres was much better than average as far as documentation went. Iconoclast!

      – mickeyf
      1 hour ago













    • @mickeyf see my update.

      – Evan Carroll
      1 hour ago
















    5















    According to the Postgres (and other) documentation, 'ALIAS' is listed as a reserved word, at least for SQL99.




    That's not true. PostgreSQL maintains a list of reserved and non-reserved terms in the appendix. ALIAS is absent from that list. You can verify PostgreSQL does not use ALIAS by checking out the YACC grammar. Even as far back as Postgres95 ALIAS was not a reserved word You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word




    • 👍 MySQL does NOT reserve ALIAS

    • 👍 Oracle does NOT reserve ALIAS

    • 👎 SQL Server does (in T-SQL) reserve ALIAS


    SQL Standard




    • In SQL-92, ALIAS was marked as a <reserved word>; but, there was no use assigned for that <reserved word>.


    • In SQL-99 ALIAS was marked as an "Additional Reserved Word", and added to the list of <reserved word>; but, there was no use assigned for that <reserved word>. Perhaps they reserved the term with the intent to define meaning later, and then withdrew it at a different point. Or, perhaps they reserved the term for vendor defined implementation. PostgreSQL reflected the spec's reservation in the docs, and then removed that reservation with the spec.


    • In SQL-2011, ALIAS is no where to be found and the word "alias" only appears in reference to 'Feature T053, “Explicit aliases for all-fields reference”'



    ℹ There is no digitized copy of SQL-86, or SQL-89






    share|improve this answer


























    • postgresql.org/docs/7.3/sql-keywords-appendix.html shows that at least some versions of Postgres did consider it a reserved word. Up through 8.something I believe. I did mention that it appeared to have been dropped as a reserved word in later versions. I did not mention SQL-2011, but older specs.

      – mickeyf
      2 hours ago











    • @mickeyf that doc is wrong, perhaps it was never upgraded when Postgres moved from QUEL to SQL ~1994. You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word, github.com/postgres/postgres/blob/…

      – Evan Carroll
      1 hour ago











    • Carrol - I have no reasonable way of checking the accuracy of the documentation. But the same page of the documentation for every version from 7.1 through 9.1 all indicate that it is a reserved word (but only for SQL99), and they do not omit it from the reserved word list until 9.2. Version 9.1 was released in 2011. So it took them all that time to correct the documentation? I suppose that's at least as plausible as that it was reserved and then 'un-reserved'. I've always had the impression the Postgres was much better than average as far as documentation went. Iconoclast!

      – mickeyf
      1 hour ago













    • @mickeyf see my update.

      – Evan Carroll
      1 hour ago














    5












    5








    5








    According to the Postgres (and other) documentation, 'ALIAS' is listed as a reserved word, at least for SQL99.




    That's not true. PostgreSQL maintains a list of reserved and non-reserved terms in the appendix. ALIAS is absent from that list. You can verify PostgreSQL does not use ALIAS by checking out the YACC grammar. Even as far back as Postgres95 ALIAS was not a reserved word You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word




    • 👍 MySQL does NOT reserve ALIAS

    • 👍 Oracle does NOT reserve ALIAS

    • 👎 SQL Server does (in T-SQL) reserve ALIAS


    SQL Standard




    • In SQL-92, ALIAS was marked as a <reserved word>; but, there was no use assigned for that <reserved word>.


    • In SQL-99 ALIAS was marked as an "Additional Reserved Word", and added to the list of <reserved word>; but, there was no use assigned for that <reserved word>. Perhaps they reserved the term with the intent to define meaning later, and then withdrew it at a different point. Or, perhaps they reserved the term for vendor defined implementation. PostgreSQL reflected the spec's reservation in the docs, and then removed that reservation with the spec.


    • In SQL-2011, ALIAS is no where to be found and the word "alias" only appears in reference to 'Feature T053, “Explicit aliases for all-fields reference”'



    ℹ There is no digitized copy of SQL-86, or SQL-89






    share|improve this answer
















    According to the Postgres (and other) documentation, 'ALIAS' is listed as a reserved word, at least for SQL99.




    That's not true. PostgreSQL maintains a list of reserved and non-reserved terms in the appendix. ALIAS is absent from that list. You can verify PostgreSQL does not use ALIAS by checking out the YACC grammar. Even as far back as Postgres95 ALIAS was not a reserved word You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word




    • 👍 MySQL does NOT reserve ALIAS

    • 👍 Oracle does NOT reserve ALIAS

    • 👎 SQL Server does (in T-SQL) reserve ALIAS


    SQL Standard




    • In SQL-92, ALIAS was marked as a <reserved word>; but, there was no use assigned for that <reserved word>.


    • In SQL-99 ALIAS was marked as an "Additional Reserved Word", and added to the list of <reserved word>; but, there was no use assigned for that <reserved word>. Perhaps they reserved the term with the intent to define meaning later, and then withdrew it at a different point. Or, perhaps they reserved the term for vendor defined implementation. PostgreSQL reflected the spec's reservation in the docs, and then removed that reservation with the spec.


    • In SQL-2011, ALIAS is no where to be found and the word "alias" only appears in reference to 'Feature T053, “Explicit aliases for all-fields reference”'



    ℹ There is no digitized copy of SQL-86, or SQL-89







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 36 mins ago

























    answered 2 hours ago









    Evan CarrollEvan Carroll

    31.4k865209




    31.4k865209













    • postgresql.org/docs/7.3/sql-keywords-appendix.html shows that at least some versions of Postgres did consider it a reserved word. Up through 8.something I believe. I did mention that it appeared to have been dropped as a reserved word in later versions. I did not mention SQL-2011, but older specs.

      – mickeyf
      2 hours ago











    • @mickeyf that doc is wrong, perhaps it was never upgraded when Postgres moved from QUEL to SQL ~1994. You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word, github.com/postgres/postgres/blob/…

      – Evan Carroll
      1 hour ago











    • Carrol - I have no reasonable way of checking the accuracy of the documentation. But the same page of the documentation for every version from 7.1 through 9.1 all indicate that it is a reserved word (but only for SQL99), and they do not omit it from the reserved word list until 9.2. Version 9.1 was released in 2011. So it took them all that time to correct the documentation? I suppose that's at least as plausible as that it was reserved and then 'un-reserved'. I've always had the impression the Postgres was much better than average as far as documentation went. Iconoclast!

      – mickeyf
      1 hour ago













    • @mickeyf see my update.

      – Evan Carroll
      1 hour ago



















    • postgresql.org/docs/7.3/sql-keywords-appendix.html shows that at least some versions of Postgres did consider it a reserved word. Up through 8.something I believe. I did mention that it appeared to have been dropped as a reserved word in later versions. I did not mention SQL-2011, but older specs.

      – mickeyf
      2 hours ago











    • @mickeyf that doc is wrong, perhaps it was never upgraded when Postgres moved from QUEL to SQL ~1994. You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word, github.com/postgres/postgres/blob/…

      – Evan Carroll
      1 hour ago











    • Carrol - I have no reasonable way of checking the accuracy of the documentation. But the same page of the documentation for every version from 7.1 through 9.1 all indicate that it is a reserved word (but only for SQL99), and they do not omit it from the reserved word list until 9.2. Version 9.1 was released in 2011. So it took them all that time to correct the documentation? I suppose that's at least as plausible as that it was reserved and then 'un-reserved'. I've always had the impression the Postgres was much better than average as far as documentation went. Iconoclast!

      – mickeyf
      1 hour ago













    • @mickeyf see my update.

      – Evan Carroll
      1 hour ago

















    postgresql.org/docs/7.3/sql-keywords-appendix.html shows that at least some versions of Postgres did consider it a reserved word. Up through 8.something I believe. I did mention that it appeared to have been dropped as a reserved word in later versions. I did not mention SQL-2011, but older specs.

    – mickeyf
    2 hours ago





    postgresql.org/docs/7.3/sql-keywords-appendix.html shows that at least some versions of Postgres did consider it a reserved word. Up through 8.something I believe. I did mention that it appeared to have been dropped as a reserved word in later versions. I did not mention SQL-2011, but older specs.

    – mickeyf
    2 hours ago













    @mickeyf that doc is wrong, perhaps it was never upgraded when Postgres moved from QUEL to SQL ~1994. You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word, github.com/postgres/postgres/blob/…

    – Evan Carroll
    1 hour ago





    @mickeyf that doc is wrong, perhaps it was never upgraded when Postgres moved from QUEL to SQL ~1994. You can see that in Postgres95 (the first version in the migration) it did not have ALIAS as a reserved word, github.com/postgres/postgres/blob/…

    – Evan Carroll
    1 hour ago













    Carrol - I have no reasonable way of checking the accuracy of the documentation. But the same page of the documentation for every version from 7.1 through 9.1 all indicate that it is a reserved word (but only for SQL99), and they do not omit it from the reserved word list until 9.2. Version 9.1 was released in 2011. So it took them all that time to correct the documentation? I suppose that's at least as plausible as that it was reserved and then 'un-reserved'. I've always had the impression the Postgres was much better than average as far as documentation went. Iconoclast!

    – mickeyf
    1 hour ago







    Carrol - I have no reasonable way of checking the accuracy of the documentation. But the same page of the documentation for every version from 7.1 through 9.1 all indicate that it is a reserved word (but only for SQL99), and they do not omit it from the reserved word list until 9.2. Version 9.1 was released in 2011. So it took them all that time to correct the documentation? I suppose that's at least as plausible as that it was reserved and then 'un-reserved'. I've always had the impression the Postgres was much better than average as far as documentation went. Iconoclast!

    – mickeyf
    1 hour ago















    @mickeyf see my update.

    – Evan Carroll
    1 hour ago





    @mickeyf see my update.

    – Evan Carroll
    1 hour ago













    3














    It is used at least in various flavours of Db2: ALIAS is an object that allows you to specify a different name for another object, like table. It's frequently used to allow references in one schema to objects in another schema without explicitly specifying that schema.



    create table SOMEOTHERSCHEMA.FOOBAR (...);
    set schema MYSCHEMA;
    create alias FOOBAR for SOMEOTHERSCHEMA.FOOBAR;
    select * from FOOBAR;


    ALIAS is an alias for SYNONYM; the latter concept also exists in Oracle and SQL Server.






    share|improve this answer




























      3














      It is used at least in various flavours of Db2: ALIAS is an object that allows you to specify a different name for another object, like table. It's frequently used to allow references in one schema to objects in another schema without explicitly specifying that schema.



      create table SOMEOTHERSCHEMA.FOOBAR (...);
      set schema MYSCHEMA;
      create alias FOOBAR for SOMEOTHERSCHEMA.FOOBAR;
      select * from FOOBAR;


      ALIAS is an alias for SYNONYM; the latter concept also exists in Oracle and SQL Server.






      share|improve this answer


























        3












        3








        3







        It is used at least in various flavours of Db2: ALIAS is an object that allows you to specify a different name for another object, like table. It's frequently used to allow references in one schema to objects in another schema without explicitly specifying that schema.



        create table SOMEOTHERSCHEMA.FOOBAR (...);
        set schema MYSCHEMA;
        create alias FOOBAR for SOMEOTHERSCHEMA.FOOBAR;
        select * from FOOBAR;


        ALIAS is an alias for SYNONYM; the latter concept also exists in Oracle and SQL Server.






        share|improve this answer













        It is used at least in various flavours of Db2: ALIAS is an object that allows you to specify a different name for another object, like table. It's frequently used to allow references in one schema to objects in another schema without explicitly specifying that schema.



        create table SOMEOTHERSCHEMA.FOOBAR (...);
        set schema MYSCHEMA;
        create alias FOOBAR for SOMEOTHERSCHEMA.FOOBAR;
        select * from FOOBAR;


        ALIAS is an alias for SYNONYM; the latter concept also exists in Oracle and SQL Server.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        mustacciomustaccio

        9,05872136




        9,05872136






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f227095%2fis-the-keyword-alias-actually-used%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Alcázar de San Juan

            Griza ansero

            Heinkel He 51