Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1096895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:20:55+00:00 2026-05-17T00:20:55+00:00

I am a PHP developer with little Oracle experience who is tasked to work

  • 0

I am a PHP developer with little Oracle experience who is tasked to work with an Oracle database.

The first thing I have noticed is that the tables don’t seem to have an auto number index as I am used to seeing in MySQL. Instead they seem to create an index out of two fields.

For example I noticed that one of the indexes is a combination of a Date Field and foreign key ID field. The Date field seems to store the entire date and timestamp so the combination is fairly unique.

If the index name was PLAYER_TABLE_IDX how would I go about using this index in my PHP code?

I want to reference a unique record by this index (rather than using two AND clauses in the WHERE portion of my SQL query)

Any advice Oracle/PHP gurus?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:20:56+00:00Added an answer on May 17, 2026 at 12:20 am

    I want to reference a unique record by this index (rather than using two AND clauses in the WHERE portion of my SQL query)

    There’s no way around that you have to use reference all the columns in a composite primary key to get a unique row.

    You can’t use an index directly in a SQL query.
    In Oracle, you use the hint syntax to suggestion an index that should be used, but the only means of hoping to use an index is by specifying the column(s) associated with it in the SELECT, JOIN, WHERE and ORDER BY clauses.

    The first thing I have noticed is that the tables don’t seem to have an auto number index as I am used to seeing in MySQL.

    Oracle (and PostgreSQL) have what are called “sequences”. They’re separate objects from the table, but are used for functionality similar to MySQL’s auto_increment. Unlike MySQL’s auto_increment, you can have more than one sequence used per table (they’re never associated), and can control each one individually.

    Instead they seem to create an index out of two fields.

    That’s what the table design was, nothing specifically Oracle about it.

    But I think it’s time to address that an index has different meaning in a database than how you are using the term. An index is an additional step to make SELECTing data out of a table faster (but makes INSERT/UPDATE/DELETE slower because of maintaining them).

    What you’re talking about is actually called a primary key, and in this example it’d be called a composite key because it involves more than one column. One of the columns, either the DATE (consider it DATETIME) or the foreign key, can have duplicates in this case. But because of the key being based on both columns, it’s the combination of the two values that makes them the key to a unique record in the table.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a PHP developer who knows a little bit of Ruby. I want to
A little background, I have a client that has a legacy php site that
Disclaimer: I'm an iOS developer with little JQuery, PHP or MySQL experience. Here's the
I'm a amateur developer with a little experience in PHP. I recently learnt Python,
I'm not a PHP developer but i've seen in a couple of places that
I'm PHP developer and I know very little when it comes to https/ssl, but
I'm a basic web developer. I know PHP, a little bit of Python and
I'm a web developer, and know my way around with php, jscript and little
I'm a web developer so all my experience is with ruby, python, or PHP.
Hello I am a php developer, trying to get going with Oracle. So I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.