diff --git a/src/sqlparser.rs b/src/sqlparser.rs index 3e11f2e9..6924a932 100644 --- a/src/sqlparser.rs +++ b/src/sqlparser.rs @@ -1611,6 +1611,10 @@ impl Parser { pub fn parse_table_and_joins(&mut self) -> Result { let relation = self.parse_table_factor()?; + + // Note that for keywords to be properly handled here, they need to be + // added to `RESERVED_FOR_TABLE_ALIAS`, otherwise they may be parsed as + // a table alias. let mut joins = vec![]; loop { let join = if self.parse_keyword("CROSS") {