How to apply media query in table?

How to query a table whose name is derived from another table?

  • I have a SQL database which has a number of tables, I have a table which has the names of all the tables in the database. I first need to derive name of a table from this table and then query that table. So the query is like: SELECT * FROM (SELECT TABLE FROM INDEX_TABLE). Please solve this problem for me as it is really urgent!! Thank you!! I got a project stuck because of this!! And I shall surely put your name on my project and shall personally tell you when it is online!!

  • Answer:

    This query can be written in two froms 1. select * from firsttable_name where name in(select name from the secondtable_name where cond2); 2. select * from firsttable_name f,secondtable s where f.name = s.name and other_condition If you have any doubts over this contact me at [email protected]

ron at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.