Reputation: 1492
We have a MySQL database, which contains the table SportsTicker with following columns (as MySQL workbench shows):
'IDSportsTicker', 'int(11)', 'NO', 'PRI', NULL, ''
'SportsID', 'smallint(6)', 'NO', '', '1', ''
'HomeTeamID', 'int(11)', 'NO', '', NULL, ''
'ForeignTeamID', 'int(11)', 'NO', '', NULL, ''
'LeagueID', 'int(11)', 'NO', '', NULL, ''
'CoverageID', 'smallint(2)', 'NO', '', NULL, ''
'PlayStateID', 'smallint(2)', 'NO', '', NULL, ''
'StadiumID', 'int(11)', 'NO', '', NULL, ''
'dateTime', 'datetime', 'NO', '', NULL, ''
'neutralGround', 'bit(1)', 'NO', '', 'b\'0\'', ''
'scoutConfirmed', 'bit(1)', 'NO', '', NULL, ''
'booked', 'bit(1)', 'NO', '', 'b\'0\'', ''
'oddsAvailable', 'bit(1)', 'YES', '', 'b\'0\'', ''
'liveOddsAvailable', 'bit(1)', 'NO', '', 'b\'0\'', ''
And I have a query, which works:
SELECT ST.IDSportsTicker, ST.HomeTeamID, T.name as HomeTeamName, ST.ForeignTeamID,
AW.name as AwayTeamName, ST.LeagueID, L.name, ST.dateTime
FROM SportsTicker ST
JOIN Team T ON ST.HomeTeamID = T.IDTeam
JOIN Team AW ON ST.ForeignTeamID = AW.IDTeam
JOIN League L ON ST.LeagueID = L.IDLeague;
I am just curious, what all those 'ST.', 'T.', 'AW.' and other prefixes mean?
Thank you very much.
Upvotes: 0
Views: 45
Reputation: 149
These are alias like nice name or temporary name which use to call the table in sort form.
Upvotes: 0