Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie to Oracle. Bunch of silly questions 5

Status
Not open for further replies.

SmileeTiger

Programmer
Mar 13, 2000
200
US
OK I am new to oracle but not to sql commands and such. So I have a 2 really basic questions:

1. I have created some tables in SQL Plus. Is there a way to get a full listing of all the tables that are created in my database?

2. I have to add a bunch of sample data to some of the tables obviously using insert into this is going to be a real pain in the neck. Is there a better way to do this?

Thanks!

Smilee

 
in one tablespace desc user_tables it shows all tables for a user, you can write your favorite select from that, for all as system desc dba_tables. I tried to remain child-like, all I acheived was childish.
 
1) To see all the tables in your user schema use:
Select * from tab; (quick and dirty)

2) Using the insert command to populate you tables is
the easiest approach, unless you know regexp and perl DBI.

StickyBit.
 
...Also, no question is ever silly. Only answers.

StickyBit.
 
a reading from the book of data dictionary...

and Larry said:
let DBA_TABLES shows all tables in the database (assuming current user has select privilege on this view)
and ALL_TABLES shall show tables for which the current user has privileges
and USER_TABLES shall show tables owned by the current user

re: inserting

is there any reason you couldn't user sqlldr? last I check that was still the fastest way to insert large amounts of data...
 
One suggestion - got to and download the free version of TOAD (Tool for Oracle Application Developers). This is a Windows tool that provides a great interface to an Oracle database. If you like what you see, you can purchase a more complete version at
The main developer of TOAD maintains a forum on yahoogroups and is very responsive to bug reports and requests for enhancements. I have never worked with a product that has such great support. The support is not due to Quest itself, but to the dedication of Toadman Jim McDaniel.
 
Hi Smilee

for question 2) have you looked up details for SQL-Loader. There are a lot of options but you will only need basic ones to be able to load up a table from a tab-delimited or CSV file.

Check out the oracle documentation or even sqlldr help initially. Here is a quick example of a control file

LOAD DATA
INFILE vat.dat
APPEND
PRESERVE BLANKS INTO TABLE vat
FIELDS TERMINATED BY '}'
OPTIONALLY ENCLOSED BY '~'
TRAILING NULLCOLS (
vat_code
, vat_percent
, last_updated_by
, time_stamp DATE "yyyymmddhh24miss"
)

and the command line
sqlldr user/pw@test1 CONTROL=vat.ctl

This loads a file in the format

~1~}~17.5~}~QCM1~}~19971222151740~}
~2~}~8~}~QCM1~}~19971222151740~}
~3~}~0~}~QCM1~}~19971222151740~}

Good luck

Ed
 
Thanks for your help everyone!

ALl suggestions were good :)

Smileetiger.
 
o_O I do have one final question though. How do I know what version of SQL realease 8i is using?
 
smilee ,
you may use the v$database view for that. Regards,
S. Jayaram Uparna .

If the need arises,you are welcome to mail me at oracguru@yahoo.com .
:)
 
what version?

It's also displayed when you start SQL*Plus Mike
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
I have a script that I developed that produces a file that can be used to look up tables and the columns in the tables as cross reference. Also good for hard copy reference. Let me know if you'd like it.

Mark_Basso@Yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top