Simple query (i can not get logic...help me)

I have 2 tables with equal fields.
Table: A Table: B
No Name No Name
1 Raju 1 Raju
2 Rani 2 Rani
3 Giri 5 Vasu
4 Venu (3 rows)
5 Vasu
(5 rows)
I need Output will be from Table A only.
No Name Flag
1 Raju True
2 Rani True
3 Giri False
4 Venu False
5 Vasu True
Please give a query to get this output.(without union concept i want)
thanks
madhava

scott@ORA92> -- test data:
scott@ORA92> select * from a
  2  /
        NO NAME
         1 Raju
         2 Raini
         3 Giri
         4 Venu
         5 Vasu
scott@ORA92> select * from b
  2  /
        NO NAME
         1 Raju
         2 Rani
         5 Vasu
scott@ORA92> -- query:
scott@ORA92> select a.no, a.name,
  2           nvl2 (b.no, 'True', 'False') as flag
  3  from   a, b
  4  where  a.no = b.no (+)
  5  /
        NO NAME  FLAG
         1 Raju  True
         2 Raini True
         3 Giri  False
         4 Venu  False
         5 Vasu  True
scott@ORA92> spool off

Similar Messages

Maybe you are looking for

  • MacBook Pro 10.6.8 Safari quits unexpectedly error.

    Can anyone tell me what the problem is with my Safari using this crash report? Process:     Safari [196] Path:        /Applications/Safari.app/Contents/MacOS/Safari Identifier:  com.apple.Safari Version:     5.1.10 (6534.59.10) Build Info:  WebBrowse

  • HDMI to DVI

    Hi, I just ordered a recent MacMini with HDMI and Thunderbolt. I already own an older Apple Cinema Display (2005, I think 20'') with a DVI port. Will I be able to connect this display to the new mini via the HDMI to DVI adapter, or do I need to buy a

  • Query - Replacement Path for a Customer Exit Variable

    Hi New to the field and the board.  Any and All help is greatly appreciated. I have created a query which runs based on a date selection. The query have few customer exit variables whose values are set in ABAP. All Key Figures in the query are brough

  • Swap IPhone 4 and IPhone 5

    I have an IPhone 4 and an IPhone 5 activated on the same account.  I would like to swap their phone numbers.  Can I use the online "switch device" feature or do I need to call Customer Service for special handling?  (I have heard something about need

  • Windows product key

    i have activated my laptop HP pavallion g6, but forget to keep that product key for windows 8. I'm intrested in installing other os also like ubuntu, bt without knowing original product key i'm afrid to do so. anyone plese help me to find my original