Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multipl table select?

Status
Not open for further replies.

krkX

Programmer
Nov 12, 2000
54
NL
How can I select multiple tables in a database not specifying the tables in the 'SELECT' statement.

I know this doesn't work : 'SELECT [whatever] FROM *'

Any clues anybody..??

Much appreciated..

krkX
 
If your on Oracle you would have to use dynamic SQL and either look up the table names from the data dictionary or pass them in as a parameter. However, why do you want to select from every table? You'd get the cartisian product back as the number of rows and could/would end up with millions / billions of rows

for example of you had three tables with 100 rows each you would get back 1,000,000 rows back, are you sure you want to join all the tables in your DB?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top