Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2008
    Posts
    1

    Unanswered: doubt in select query

    Hi,
    I'm having 3 tables. mm,sm, and md.
    In mm in i've 3 fields mid,mno,mname.. in sm i've 3 fields like sid,sno,sname and in md i've mdid,mdno,mdcapacity,mdyearofmfg
    MM
    ======
    mid mno mname
    1 M0001 xxxx
    2 M0003 yyyyy

    SM
    ===
    sid sno sname
    1 S0001 Sample
    2 S0002 Sample1

    MD
    ====
    mdid mdno mdcapacity mdyearofmfg
    1 C0001 2HP 2007

    like this
    but what is my doubt is.. I want one select query which should have answer like this

    mno mname sno sname mdid mdcapacity mdyearofmfg
    M0001 xxxx S0001 Sample 1 2HP 2007

    How to get this.. Help me in this.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by rk4088
    How to get this..
    you can't

    the tables are not related

    you will have to redesign them
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •