Reputation: 1035
I'm working with some SQL and trying to understand what is going on.
Within the select there are what seem like variables s.id
s.status
with
last_transactions as (
select
s.id as station_id,
s.status as status,
case...........
What are these s.
items and how do they work?
Upvotes: 1
Views: 759
Reputation: 13
S
is table alias and through .
dot we can access that table column.
Example..
Select S.id from Sample as S
It give you all id's of the sample table.
Upvotes: 1
Reputation: 11
s.
is a reference to the table name that derives from the From
clause that probably follows in your query. The part after the .
is the column name.
For example s.id
means: Column 'id' from table 's'
Upvotes: 1
Reputation: 3970
.
notation is used to reference columns mainly of a table, view etc. schema objects or an aliased name of a schema object as above you have used s as alias name of some table so using s.
the part after dot references to the column in that s or table aliased
Upvotes: 1