nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

How to List my tables in Oracle database

This is a discussion on How to List my tables in Oracle database within the Databases servers forums, part of the Mastering Servers category; I am glad to know that we have Database forum here. Just installed Oracle database server under Ubuntu Linux, It ...


Go Back   nixCraft Linux Forum > Mastering Servers > Databases servers

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 12-19-2006, 01:55 AM
Guest
 
Posts: n/a
Default How to List my tables in Oracle database

I am glad to know that we have Database forum here.

Just installed Oracle database server under Ubuntu Linux, It did took some time but finally beast is installed.

Now how do I list tables? Mysql has
Code:
SHOW DATABASES;
USE mydb;
SHOW TABLES;
SELECT * FROM mytable;
So far I am able to login into the Oracle using command-line tool called SQL*Plus:
Code:
$ sqlplus scott/tiger
Now how do I list tables?

I am just taking print out of Oracle sql pdf but please give me command so that I know it is working.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-19-2006, 02:03 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 967
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

To list all your tables in Oracle server, use the following command:
Code:
SELECT * FROM cat;
First connect to server using Oracle sql plus client:
Code:
sqlplus scott/tiger
Now type at sql> prompt:
Code:
SELECT * FROM cat;
Also don't forget to set the column widths
Code:
COL table_name FORMAT a30;
COL table_type FORMAT a30;
Now to get list of tables in oracle:
Code:
SELECT * FROM cat;
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 12-19-2006, 02:18 AM
Guest
 
Posts: n/a
Default

yupeeeeeeeeeee worked like a charm \/
Reply With Quote
  #4 (permalink)  
Old 12-20-2006, 03:25 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 578
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Oracle - i can't touth that :P
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Reply

Bookmarks

Tags
col , linux , oracle , select , sql , sqlplus , unix , windows


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Routing tables flushed milank Linux hardware 3 12-24-2007 11:51 AM
Routing Tables flushed milank CentOS / RHEL / Fedora 0 11-05-2007 11:26 PM
Installing oracle database on debian raj Databases servers 1 08-16-2007 07:00 PM
IP Tables Configuration jhn_daz@yahoo.com Networking, Firewalls and Security 2 07-23-2007 03:40 AM
Oracle "show databases" list raj Databases servers 1 05-18-2007 01:21 AM


All times are GMT +5.5. The time now is 05:55 AM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36