Oracle sql query


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Oracle sql query

  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,666
    Something like
    Code:
    select prod.num, prod.name, pri.num, pri.price
    from products prod
    inner join price pri on pri.num = prod.num
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

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