Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can we use query containing two or more tables!  RSS feed

 
rushikesh kale
Ranch Hand
Posts: 41
Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!
In my interview one of the interviewer ask me the question :"how can we use single query having two tables name in that?"
Can anybody suggest how to do this!

Thanks in advanced!
Regards
Rushikey
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
select * from table1, table2
 
Michael Matola
whippersnapper
Ranch Hand
Posts: 1828
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that in the vast majority of queries involving more than one table, you'll want to perform some sort of join on the tables.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!