Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Oracle ROWID
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00274072
Message ID:
00274140
Vues:
30
Very BAD idea. You really should have a real column to hold each row's PK. If you have an Oracle7 Server Application Developer's Guide, read in section 3, starting on page 8 about ROWID. You are asking for major problems if you use this as your PK.

The biggest problem is what are you going to do for a FK reference in another table? The ROWID of the parent table? OK, now you have used the ROWID of one table and stored it in another table as a FK reference. Your Oracle DBA routinely backsup the Oracle DBA by doing exports. The system crashes. The database is restored from the exports. The ROWIDs just got changed, but the IDs you stored in real columns as FKs still reference the old ROWIDs.

>Anyone work with Oracle's pseudo-column ROWID?
>
>I can get it to appear in my remote view, but I want to use it as the primary key for doing updates.
>
>Anyone know how? I'd hate to create another primary key column if I don't have to.
>
>Scott
>
>
>PS. To add the ROWID column to a remote view, you have to do it programmatically (at least it appears this way). If you try and do it through the VFP database designer, it doesn't recognize the column name and doesn't let you save the remote view.
>
>Just write the code:
>CREATE SQL VIEW MyView ;
> REMOTE ;
> CONNECTION MyConnection ;
> AS SELECT mytable.rowid, mytable.* FROM mytable
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform