can we just extract the where condition? #567
Replies: 1 comment
-
from sqlglot import parse_one, exp
sql = "SELECT a.id, b.first_name, b.last_name FROM table1 a, table2 b where a.id = b.id;"
parse_one(sql).find(exp.Where).this.sql() |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tobymao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is it possible to get relation between the tables using sqlglot.
eg: SELECT a.id, b.first_name, b.last_name FROM table1 a, table2 b where a.id = b.id;
output : a.id = b.id
Beta Was this translation helpful? Give feedback.
All reactions