SQL Aliases Question

Joe Maus jmaus at theccgllc.com
Tue Jun 7 20:19:44 UTC 2022

Hi Das,

Table aliases would be available in the where clause (for any major database anyway, there may be some that don't support that somewhere...) but column aliases would likely not be available to you in the where clause.  But column aliases could be available in a "having" clause though - but again, depends on the database.


Joe Maus
The Convergent Consulting Group, LLC
jmaus at theccgllc.com

> On Jun 7, 2022, at 4:05 PM, Das Goravani <goravanis at gmail.com> wrote:
> 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 mailing list