SQL Aliases Question
maxh at carrubba.com
Tue Jun 7 20:08:10 UTC 2022
I believe that only applies to column aliases
For example this works:
select * from table_name t
but this wont,
select column as c from table_name
From: omnisdev-en <omnisdev-en-bounces at lists.omnis-dev.com> on behalf of Das Goravani <goravanis at gmail.com>
Sent: Tuesday, June 7, 2022 4:05 PM
To: OmnisDev List - English <omnisdev-en at lists.omnis-dev.com>
Subject: SQL Aliases Question
I am studying SQL and have a question about aliases.
#1 In one place I read that it’s good practice to use aliases for things like table names, and even column names if applicable, and further that once you declare aliases you have to use only them and not the full say table name to qualify columns.
#2 But in another place I read that aliases are not available when the WHERE clause is being calculated.
So does that mean you can’t use them in WHERE clauses?
How does that merge with the ideas I pose in my point #1
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
More information about the omnisdev-en