Parse SQL and for each column get column name, table name, column alias and table alias #1717
Unanswered
Vipin-Sharma
asked this question in
Q&A
Replies: 1 comment
-
Greetings. Step 1) use JSQLParser to get all the involved tables This will work for the very most statements although it may be possible to craft some evil statements, where it may deliver wrong/incomplete results. Good luck! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is best way to get column name, table name, column alias and table alias for each column in a SQL?
As given on the question https://stackoverflow.com/questions/58984896/listing-all-the-tables-columns-of-parsed-sql-select-statement I understand JSQLParser is only parser, we need information of DB schema as well in order to get this information. I have DDL file so I can read info related to schema. What would be best way to do this with help of JSQLParser? If can not be done completely via JSQLParser then what all things JSQLParser can do in this case and if you have suggestion for next steps that would be very helpful.
Beta Was this translation helpful? Give feedback.
All reactions