Hello, Please help in the proper sql select statement for the following. I have 15 tables. Each table includes a View column. I would like to return true values for the tables that have at least one row where View = "somevalue". For example, say I had only three tables, and table2 was the only one that had at least one row where View = "somevalue", I would like to return a result set like so: -------------------------------- | table1 | table2 | table3 | -------------------------------- | 0 | 1 | 0 | -------------------------------- Basically I would like to perform this query so I will know which tables I can perform futher queries on. The count of the rows in each table where view = "somevalue" is not really important, I just want to know which tables have at least one. On the otherhand, maybe a better approach would be to return one column ( thetablename ), containing the name of the tables that have at least one row where View = "somevalue". Using my example above the result set would look like this: --------------- | thetablename | ---------------- | table2 | ---------------- Ether approach would yield the same data basically. How would I code the sql for either approach? Thanks so much in advance. Steve ---------------------------------------------------------------- Get your free email from AltaVista at http://altavista.iname.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php