Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Query in oracle

Query in oracle

Scheduled Pinned Locked Moved IT & Infrastructure
databaseoraclequestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ramya G
    wrote on last edited by
    #1

    I am using two different tables products and product details . Product ID is the primary key of the products table and is the foreign key reference to the Product details table. I want to fetch only five 5 records from the products table and for each productID I need two records from the product details table. I am using oracle 9i database. Can anyone provide an effective solution to this?

    J 1 Reply Last reply
    0
    • R Ramya G

      I am using two different tables products and product details . Product ID is the primary key of the products table and is the foreign key reference to the Product details table. I want to fetch only five 5 records from the products table and for each productID I need two records from the product details table. I am using oracle 9i database. Can anyone provide an effective solution to this?

      J Offline
      J Offline
      Johan Lombaard
      wrote on last edited by
      #2

      You can use rownum to limit the results. eg. : select * from blahblah where rownum < 6

      Johan Lombaard Only two things are infinite, the universe and human stupidity, and I'm not sure about the former - Albert Einstein

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups