This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get child table values from parent query

 
Reshma Reddy
Ranch Hand
Posts: 197
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to get second(reference) table status using id in first query.

I am calling select * from table1;
this table1 contains one column called referenceid. This reference id details will be there in table2 (id,status,date....etc). At time the of calling select * from table1 I want to get reference id status instedof referenceid.

Please provide any query.
 
Agador Paloi
Ranch Hand
Posts: 118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you want to join table1 with table2 to get a status from table2.
Query would be
SELECT
t2.id ,
t2.status
FROM
table1 t1,
table2 t2
WHERE
t1.id = t2.id


Agad
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic