Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > PostgreSQL > doubt in select query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-17-08, 02:53
rk4088 rk4088 is offline
Registered User
 
Join Date: Jun 2008
Posts: 1
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.
Reply With Quote
  #2 (permalink)  
Old 06-17-08, 07:23
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 13,537
Quote:
Originally Posted by rk4088
How to get this..
you can't

the tables are not related

you will have to redesign them
__________________
r937.com | rudy.ca

pre-order my book Simply SQL from Amazon
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On