dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011
    Posts
    1

    Oracle sql query

    hi,

    trying to get the below output from the products and price tables.

    products
    NUM NAME
    ------ ---------
    1 xxxx
    2 yyyy
    3 zzzzz

    price
    NUM PRICE
    ---- ----------
    1 10
    2 20
    30

    output
    num name price
    1 xxxxx 10
    2 yyyy 20
    3 yyyy 30

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,663
    Something like
    Code:
    select prod.num, prod.name, pri.num, pri.price
    from products prod
    inner join price pri on pri.num = prod.num

Similar Threads

  1. SQL Query with Fulltext engine in SQL 2005
    By padmavathi in forum Database
    Replies: 1
    Last Post: 09-29-2008, 02:38 PM
  2. Replies: 5
    Last Post: 04-17-2008, 01:29 PM
  3. Replies: 0
    Last Post: 02-06-2002, 11:07 AM
  4. how to write this SQL query and SQL assertion
    By Diana Perkins in forum Database
    Replies: 2
    Last Post: 11-22-2000, 09:14 AM
  5. Re: ODBC error
    By Devaraj in forum Enterprise
    Replies: 0
    Last Post: 05-11-2000, 12:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center






×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.