Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 15th, 2005, 09:11 AM
AxsDeny AxsDeny is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Pittsburgh
Posts: 4 AxsDeny User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 14 sec
Reputation Power: 0
Question mysqlshow equivalent?

Please don't flame me too hard, I'm new to Oracle, so excuse my ignorance.

How do I get Oracle (9i) to show me the structure of a specific table along the same lines that the following mysql statement would:

mysqlshow DBname tablename;

If you need any more info, please let me know. Thanks for the help!

Reply With Quote
  #2  
Old March 15th, 2005, 09:49 AM
djjhouse djjhouse is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: Colorado, USA
Posts: 68 djjhouse User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 15 h 7 m
Reputation Power: 4
you could try

Code:
select * from user_tables;

and/or

select * from cols;



These returns tons of information.

Reply With Quote
  #3  
Old March 15th, 2005, 09:54 AM
AxsDeny AxsDeny is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Pittsburgh
Posts: 4 AxsDeny User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 14 sec
Reputation Power: 0
Quote:
Originally Posted by djjhouse
you could try
Code:
select * from user_tables;

This returns tons of information.


I need it to return something like:
Code:
CREATE TABLENAME {
  blah varchar2(50),
  blah2 varchar(25)
}

Reply With Quote
  #4  
Old March 15th, 2005, 10:02 AM
pabloj's Avatar
pabloj pabloj is online now
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,923 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 18 h 38 m 51 sec
Reputation Power: 279
Google knows the answer

Note that a more appropriate subject would have been something like: "How to retrieve DDL (data definition language) for table?"

Last edited by pabloj : March 15th, 2005 at 10:09 AM.

Reply With Quote
  #5  
Old March 15th, 2005, 12:08 PM
AxsDeny AxsDeny is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Pittsburgh
Posts: 4 AxsDeny User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 14 sec
Reputation Power: 0
Quote:
Originally Posted by pabloj
Google knows the answer

Note that a more appropriate subject would have been something like: "How to retrieve DDL (data definition language) for table?"


Therein lied the problem. The syntax is pretty different from MySQL to Oracle, so I didn't even know what to search for. Trust me, forums are my last resort. Regardless, thanks for the help.

Reply With Quote
  #6  
Old March 16th, 2005, 03:04 AM
pabloj's Avatar
pabloj pabloj is online now
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,923 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 18 h 38 m 51 sec
Reputation Power: 279
The problem should be solved in MySQL 5, it will implement proper system views (like Oracle and other databases).

Reply With Quote
  #7  
Old March 16th, 2005, 11:28 AM
paulh1983 paulh1983 is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Dec 2004
Posts: 1,255 paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level)paulh1983 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 15 h 14 m
Reputation Power: 17
simple answer is:

describe "your table name"; (without quotes eg if u have table called: student do: describe student;

simple

Reply With Quote
  #8  
Old March 16th, 2005, 12:02 PM
AxsDeny AxsDeny is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Pittsburgh
Posts: 4 AxsDeny User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 14 sec
Reputation Power: 0
Quote:
Originally Posted by paulh1983
simple answer is:

describe "your table name"; (without quotes eg if u have table called: student do: describe student;

simple


That doesn't do what I want. I want it to spit out the table creation code. Not to describe the columns within a table.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > mysqlshow equivalent?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT