title: mysql - display the values that exists in ALL the tables
body: <p>i did a quick search here but wasn't able to find the answer i was looking for. here is what i would like to do:</p>
  
  <p>i am creating a simple event registration tracking system. </p>
  
  <p>i have a database called registration and in that database i have created <strong>10 tables</strong> called table1, table2..... table10. all these tables just has <strong>one column: user_id</strong></p>
  
  <p>i have one more table called <strong>userinfo</strong> and this table has 2 columns called <code>user_id</code> and <code>username</code> .</p>
  
  <p>i need to create a query that checks whether <strong>ANY user_id exists</strong> in ALL the tables. if it does, it will display that user's name from the userinfo table.</p>
  
  <p>i was thinking of using count function to get the total count for each user_id and if i get a count of 11, it will tell me that <strong>user_id</strong> exists in every table.</p>
  
  <p>but I am not sure if that the proper way to go. any ideas will be appreciated. i am not good with queries so if someone could post an example as well. thanks a lot in advance.</p>