Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> find primary key with table name

find primary key with table name

From: Jean-Luc M. <alphomega_at_free.fr>
Date: Tue, 02 Jan 2007 10:32:04 +0100
Message-ID: <mn.12787d71e3110dcb.28556@free.fr>


Hi,

I need to translate the T-SQL code :

SELECT
  @PK_NAME = so.name
FROM
  sysobjects so JOIN sysconstraints sc ON so.id = sc.constid WHERE
  object_name(so.parent_obj) = @TABLE AND so.xtype = 'PK'

in PL-SQL

How to find the primary key for a table name with PL-SQL and delete it ?

Thanks and happy new year !

Jean-Luc !

--

Jean-Luc M. Received on Tue Jan 02 2007 - 03:32:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US