Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

How to get the name of a table from an Insert, Update or Delete SQL without parsing - response (3) by mszumowski

$
0
0

Thanks ahead of time for your helpful response
1. The output of EXPLAIN appears to be a bit too much to attempt to parse.
2. SHOW QUALIFIED does look managable.
I have a question:
Lets take for example we have an insert-select. When I prepend SHOW QUALIFIED to the SQL and execute, in the result set I see the following:
1. I first see the SQL
2. Second I see the DDL of the select table
3. and last I see the DDL of the insert table.
My Question: can someone speak to the rules on how that order of the tables DLL is generated?  I'm really looking to nail down a programmatic way to say "this is the table that will be modified executing this SQL".


Viewing all articles
Browse latest Browse all 14773

Trending Articles