Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database question???

 
darine darine
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have installed oracle on my c:\ drive and created database for example of name 'abc'.
now when i go to sqlplus editor and create
a table 'customers' and i do desc command i see all its columns,the question is: is that table 'customers' now in that database 'abc'?
How do i know that?is there a sql statement to show me all tables in that database 'abc'?(sample code plz).
I'm sure i can create many databases too other than 'abc' ...is that right?
To connect to 'abc' is database url should be like the following:
"jdbc racle:thin@localhost:1521:abc"
is that right?
Thanks for your time.
 
Adam Hardy
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody jump in here and correct me if I'm wrong but in Oracle the databases are actually namespaces and they are defined by the owner. So to see all tables in one namespace, you can query the all_tables view:
SELECT table_name FROM all_tables
WHERE owner = 'adam'
 
Mahesh Mamani
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
The sql statement is "select * from tab"

MSM
 
Murali Obla
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Try this query
"connect username/password @database name".
Then type "select * from tab".It will show u the tables available in that database.
Regards,
Murali
 
Monty Ireland
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search this form for code examples.
I have posted Oracle, DB2, CloudScape, and MS-Access examples.
Search this form for Monty or Monty6
Start you search around Sept of 2001
You may have to go back about 6 to 12 months.
You should be able to find the anser to your question(s) in one of my code fragments.
Hope this helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic