What does it do - single Char followed by punctuation used as a prefix to a table or column e.g. u.table

Hi guys,

Just trying to understand the use of a single characters followed by a punctuation as a prefix to a table or column name.

For example:

WITH processed_users
AS ( SELECT LEFT (u . phone_country , 2 ) AS short_phone_country ,
u . id
FROM users u)

“users” is the table, “phone_country” is the column but what is the relevance of the u.

Can anyone shed some light on this feature? What is is called? What is ts used for? I feel like it is an abbreviation or a simplification tool but haven’t been able to find any hits on google for its use specifically, probably because I do not have the actual term for the feature.

Many thanks for any support.

Best,
Nick

its table aliasing, here:

FROM users u

you alias the table users to u, its a shorthand of:

FROM users AS u
2 Likes

That was quick, thanks a lot, stetim94.