Is the keyword “ALIAS” actually used?
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
add a comment |
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
add a comment |
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
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
postgresql postgresql-9.1 sql-standard reserved-word
edited 2 days ago
Evan Carroll
31.6k965211
31.6k965211
asked 2 days ago
mickeyfmickeyf
2881310
2881310
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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,
ALIASwas marked as a<reserved word>; but, there was no use assigned for that<reserved word>.In SQL-99
ALIASwas 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,
ALIASis 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
add a comment |
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.
4
ALIASis an alias forSYNONYM– hmm, I guess you could also sayALIASis a synonym ofSYNONYM...
– Andriy M
2 days ago
2
@AndriyM It's the other way around:SYNONYMis a synonym forALIAS, though not always.
– mustaccio
2 days ago
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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,
ALIASwas marked as a<reserved word>; but, there was no use assigned for that<reserved word>.In SQL-99
ALIASwas 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,
ALIASis 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
add a comment |
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,
ALIASwas marked as a<reserved word>; but, there was no use assigned for that<reserved word>.In SQL-99
ALIASwas 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,
ALIASis 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
add a comment |
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,
ALIASwas marked as a<reserved word>; but, there was no use assigned for that<reserved word>.In SQL-99
ALIASwas 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,
ALIASis 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
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,
ALIASwas marked as a<reserved word>; but, there was no use assigned for that<reserved word>.In SQL-99
ALIASwas 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,
ALIASis 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
edited yesterday
answered 2 days ago
Evan CarrollEvan Carroll
31.6k965211
31.6k965211
add a comment |
add a comment |
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.
4
ALIASis an alias forSYNONYM– hmm, I guess you could also sayALIASis a synonym ofSYNONYM...
– Andriy M
2 days ago
2
@AndriyM It's the other way around:SYNONYMis a synonym forALIAS, though not always.
– mustaccio
2 days ago
add a comment |
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.
4
ALIASis an alias forSYNONYM– hmm, I guess you could also sayALIASis a synonym ofSYNONYM...
– Andriy M
2 days ago
2
@AndriyM It's the other way around:SYNONYMis a synonym forALIAS, though not always.
– mustaccio
2 days ago
add a comment |
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.
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.
answered 2 days ago
mustacciomustaccio
9,14872136
9,14872136
4
ALIASis an alias forSYNONYM– hmm, I guess you could also sayALIASis a synonym ofSYNONYM...
– Andriy M
2 days ago
2
@AndriyM It's the other way around:SYNONYMis a synonym forALIAS, though not always.
– mustaccio
2 days ago
add a comment |
4
ALIASis an alias forSYNONYM– hmm, I guess you could also sayALIASis a synonym ofSYNONYM...
– Andriy M
2 days ago
2
@AndriyM It's the other way around:SYNONYMis a synonym forALIAS, 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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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