Is the keyword “ALIAS” actually used?












8















According to PostgreSQL 7.1 through 9.1 (now unsupported), ALIAS is listed as a reserved word, at least for SQL-99. Later versions do not show it - suggesting that it has been dropped as a reserved word. The old PostgreSQL docs do say "the presence of a key word does not indicate the existence of a feature." When aliasing a table or column I've seen AS, but never ALIAS.



Where is (or was) the SQL keyword ALIAS used? Was it ever in-use or only ever reserved for future-use?










share|improve this question





























    8















    According to PostgreSQL 7.1 through 9.1 (now unsupported), ALIAS is listed as a reserved word, at least for SQL-99. Later versions do not show it - suggesting that it has been dropped as a reserved word. The old PostgreSQL docs do say "the presence of a key word does not indicate the existence of a feature." When aliasing a table or column I've seen AS, but never ALIAS.



    Where is (or was) the SQL keyword ALIAS used? Was it ever in-use or only ever reserved for future-use?










    share|improve this question



























      8












      8








      8








      According to PostgreSQL 7.1 through 9.1 (now unsupported), ALIAS is listed as a reserved word, at least for SQL-99. Later versions do not show it - suggesting that it has been dropped as a reserved word. The old PostgreSQL docs do say "the presence of a key word does not indicate the existence of a feature." When aliasing a table or column I've seen AS, but never ALIAS.



      Where is (or was) the SQL keyword ALIAS used? Was it ever in-use or only ever reserved for future-use?










      share|improve this question
















      According to PostgreSQL 7.1 through 9.1 (now unsupported), ALIAS is listed as a reserved word, at least for SQL-99. Later versions do not show it - suggesting that it has been dropped as a reserved word. The old PostgreSQL docs do say "the presence of a key word does not indicate the existence of a feature." When aliasing a table or column I've seen AS, but never ALIAS.



      Where is (or was) the SQL keyword ALIAS used? Was it ever in-use or only ever reserved for future-use?







      postgresql postgresql-9.1 sql-standard reserved-word






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago









      Evan Carroll

      31.6k965211




      31.6k965211










      asked 2 days ago









      mickeyfmickeyf

      2881310




      2881310






















          2 Answers
          2






          active

          oldest

          votes


















          15














          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 (the first version in the migration from QUEL to SQL)




          • 👍 MySQL does NOT reserve ALIAS

          • 👍 MariaDB does NOT reserve ALIAS

          • 👍 Oracle does NOT reserve ALIAS

          • 👎 SQL Server does (in T-SQL) reserve ALIAS (as a potential future keyword on their "reserved keyword" list)


          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

































            7














            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



















            • 4





              ALIAS is an alias for SYNONYM – hmm, I guess you could also say ALIAS is a synonym of SYNONYM...

              – Andriy M
              2 days ago






            • 2





              @AndriyM It's the other way around: SYNONYM is a synonym for ALIAS, though not always.

              – mustaccio
              2 days ago













            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









            15














            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 (the first version in the migration from QUEL to SQL)




            • 👍 MySQL does NOT reserve ALIAS

            • 👍 MariaDB does NOT reserve ALIAS

            • 👍 Oracle does NOT reserve ALIAS

            • 👎 SQL Server does (in T-SQL) reserve ALIAS (as a potential future keyword on their "reserved keyword" list)


            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






























              15














              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 (the first version in the migration from QUEL to SQL)




              • 👍 MySQL does NOT reserve ALIAS

              • 👍 MariaDB does NOT reserve ALIAS

              • 👍 Oracle does NOT reserve ALIAS

              • 👎 SQL Server does (in T-SQL) reserve ALIAS (as a potential future keyword on their "reserved keyword" list)


              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




























                15












                15








                15







                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 (the first version in the migration from QUEL to SQL)




                • 👍 MySQL does NOT reserve ALIAS

                • 👍 MariaDB does NOT reserve ALIAS

                • 👍 Oracle does NOT reserve ALIAS

                • 👎 SQL Server does (in T-SQL) reserve ALIAS (as a potential future keyword on their "reserved keyword" list)


                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 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 (the first version in the migration from QUEL to SQL)




                • 👍 MySQL does NOT reserve ALIAS

                • 👍 MariaDB does NOT reserve ALIAS

                • 👍 Oracle does NOT reserve ALIAS

                • 👎 SQL Server does (in T-SQL) reserve ALIAS (as a potential future keyword on their "reserved keyword" list)


                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 yesterday

























                answered 2 days ago









                Evan CarrollEvan Carroll

                31.6k965211




                31.6k965211

























                    7














                    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



















                    • 4





                      ALIAS is an alias for SYNONYM – hmm, I guess you could also say ALIAS is a synonym of SYNONYM...

                      – Andriy M
                      2 days ago






                    • 2





                      @AndriyM It's the other way around: SYNONYM is a synonym for ALIAS, though not always.

                      – mustaccio
                      2 days ago


















                    7














                    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



















                    • 4





                      ALIAS is an alias for SYNONYM – hmm, I guess you could also say ALIAS is a synonym of SYNONYM...

                      – Andriy M
                      2 days ago






                    • 2





                      @AndriyM It's the other way around: SYNONYM is a synonym for ALIAS, though not always.

                      – mustaccio
                      2 days ago
















                    7












                    7








                    7







                    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 days ago









                    mustacciomustaccio

                    9,14872136




                    9,14872136








                    • 4





                      ALIAS is an alias for SYNONYM – hmm, I guess you could also say ALIAS is a synonym of SYNONYM...

                      – Andriy M
                      2 days ago






                    • 2





                      @AndriyM It's the other way around: SYNONYM is a synonym for ALIAS, though not always.

                      – mustaccio
                      2 days ago
















                    • 4





                      ALIAS is an alias for SYNONYM – hmm, I guess you could also say ALIAS is a synonym of SYNONYM...

                      – Andriy M
                      2 days ago






                    • 2





                      @AndriyM It's the other way around: SYNONYM is a synonym for ALIAS, though not always.

                      – mustaccio
                      2 days ago










                    4




                    4





                    ALIAS is an alias for SYNONYM – hmm, I guess you could also say ALIAS is a synonym of SYNONYM...

                    – Andriy M
                    2 days ago





                    ALIAS is an alias for SYNONYM – hmm, I guess you could also say ALIAS is a synonym of SYNONYM...

                    – Andriy M
                    2 days ago




                    2




                    2





                    @AndriyM It's the other way around: SYNONYM is a synonym for ALIAS, though not always.

                    – mustaccio
                    2 days ago







                    @AndriyM It's the other way around: SYNONYM is a synonym for ALIAS, though not always.

                    – mustaccio
                    2 days ago




















                    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

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    Origin of the phrase “under your belt”?