Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2005, 07:08 AM
Registered User
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sp_help equivalent in oracle

sp_help <table name>
will get all the information about the table such as foreign keys..
is there any way we can get table information in oracle9i

 
Old June 26th, 2005, 09:52 PM
_AP _AP is offline
Authorized User
 
Join Date: Jun 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to _AP
Default

table information :
describe <TABLE_NAME>

foreign keys...try this :

select
ucA.Table_Name TABLE_PARENT,ucA.Constraint_Name,decode(ucA.Constr aint_Type, 'P', 'PRIMARY KEY', ucA.Constraint_Type ) Constraint_Type,
ucB.Table_Name TABLE_CHILD,ucB.Constraint_Name,decode(ucB.Constra int_Type, 'R', 'FOREIGN KEY', ucB.Constraint_Type ) Constraint_Type
from user_constraints ucA, user_constraints ucB
where ucB.r_Constraint_Name=ucA.Constraint_Name



 
Old June 28th, 2005, 10:11 AM
Registered User
 
Join Date: Jun 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes i tried executing the statement desc <tablename> in toad it got me all the required information of table
but when i run the same query via asp.net application it gives me error:Invalid Sql statement
can anybody help me

 
Old June 29th, 2005, 07:06 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Select * from user_constraints where table_name=mytab;
mytab= name of ur table

 
Old July 1st, 2005, 02:52 AM
_AP _AP is offline
Authorized User
 
Join Date: Jun 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to _AP
Default

maybe DBMS_METADATA will help you






Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle SOA, BPEL and Oracle worklist umeshtheone Pro Java 1 April 16th, 2008 11:01 PM
description != '' equivalent XMLUser XSLT 3 March 1st, 2008 12:58 PM
call oracle function using oracle link server vl SQL Server 2000 1 July 12th, 2007 08:19 AM
How to Read Oracle Data without Oracle being insta badrinarayanang Oracle 1 October 6th, 2005 06:34 AM
ASP Equivalent U.N.C.L.E. Classic ASP Basics 3 July 8th, 2003 03:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.