Matt L
Matt L

Reputation: 29

Syntax for explicitly referencing a column name

I'm trying to make a join to a date table on a column called 'date'. The issue I have is that the column name is the same as the table and it seems to be making a referencing to the table rather than the column (hence the yellow highlighting). I've found a workaround which is to rename the table - though does anyone know how to explicitly reference the column in the join rather than the table if they have the same name? Picture example

Upvotes: 1

Views: 589

Answers (1)

Abdulrahman Ali
Abdulrahman Ali

Reputation: 615

You can give aliases to the table/column and use that instead. Otherwise, you can use the table name before the column with a . as a separator, i.e., TableName.date = date.

Upvotes: 3

Related Questions