Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get Primary key - Oracle
Message
 
 
À
17/04/2003 08:19:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00778770
Message ID:
00778893
Vues:
19
>Hi,
>
>Using SQL passthrough I need to return the primary key of an Oracle table. Against Microsoft SQL Server I can call the stored procedure or directly query the syscolumns and sysobjects tables.
>
>Are there equivalents in Oracle ?
SELECT
  UC.Constraint_Type,
  IC.Index_Name,
  IC.Table_Name,
  IC.Column_Name
FROM
   User_Constraints UC, User_Ind_Columns IC
WHERE IC.Index_Name = UC.Constraint_Name
   and UC.Constraint_Type = 'P'
ORDER BY IC.Table_Name
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform