Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Get tables from sql statment

$
0
0

Hello,

I need to find out all of the tables that any sql statement is dealing with.

So: 

Select * from Person

Would return "Person"

I would also like:

SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name=table2.column_name;

Would Return: table1, table2

Any suggestions.

I'm using c#

Thanks,

d3


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>