I have 2 Databases. How can create a table in particular
database? How can i know the list of tables presented each
database?( in oracle 10g)

Answers were Sorted based on User's Feedback



I have 2 Databases. How can create a table in particular database? How can i know the list of table..

Answer / neeraj sinha

suppose you have two databases: db1 and db2
you have to select one of them
as
sql>use db1;
then use
sql>select * from tab;
it will show you the listing required.!

Is This Answer Correct ?    11 Yes 2 No

I have 2 Databases. How can create a table in particular database? How can i know the list of table..

Answer / amit

Suppose your 2 databases are name as PROD1 and PROD2
1) How can create a table in particular database?
=> First you have to connect to the database where you want
to create table with given login and password.
and then if you have create permission than you can use
following sql
CREATE TABLE "table_name"
("column 1" "data_type_for_column_1",
"column 2" "data_type_for_column_2",
... )

2) select * from tab; will show you how many tables,view or
synonyms are there in your schema.

Is This Answer Correct ?    6 Yes 0 No

I have 2 Databases. How can create a table in particular database? How can i know the list of table..

Answer / meher

If you want to list the tables presented in each database
use the below query:

SELECT * FROM DBA_TABLES; or SELECT * FROM USER_TABLES; -->
this will display all the tables of particulara db.

If you use SELECT * FROM TAB; --> this will display all the
tables,views or synonyms of particulara db.

Is This Answer Correct ?    3 Yes 0 No

I have 2 Databases. How can create a table in particular database? How can i know the list of table..

Answer / vishnu

you can also use the database links to get the data from
other database tables. syntax is table_name@db_link.

Is This Answer Correct ?    3 Yes 2 No

I have 2 Databases. How can create a table in particular database? How can i know the list of table..

Answer / priya

login to one database like
sqlplus username@databasename/password

After enter into sql
create table databasename.tablename
and to call select * from databasename.tablename

then to connect to other user

connect dbuser/pwd (not sure of this statement .. It should
be something like this please google it otherwise)

and to list the tables particular to database:
select * from tab; fetch the result from that particular
database which is connected

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Maximum how many triggers can we use in trigger and How to find out how many records it fetched.

1 Answers   TCS,


what is outer join? what is selef join? what is difference between them? what is cartecion join?

1 Answers   Fiserv, Herbinger, Synechron,


what is difference b/w pravite procedures and public procedures?

3 Answers   Steria, Wipro, Zensar,


Hello All, Could any well write a query for the following scenario. Account(table name) No Name Amount 1 ABCD 2000.00 2 DEFG -2000.00 3 GHIJ 3000.50 4 JKLM 4000.00 5 MNOP 6000.00 O/p Should be in this format No Name Credit Debit 1 ABCD 2000.00 0 2 DEFG 0 -2000.00 3 GHIJ 3000.50 4 JKLM 0 -4000.00 5 MNOP 6000.00 o could any one give appropriate query for this Thnks in Advance Suneel Reddy

6 Answers   Target,


Difference between a query and strored procedure?

4 Answers   Microsoft,






What are the string functions in sql?

0 Answers  


How to return multiple rows from the stored procedure?

0 Answers  


what is the purpose of update command in oracle?

7 Answers   MBT,


What is trigger in sql and its types?

0 Answers  


how to insert the data through views? The view is depending upon more than two tables? how to update materalized views?

3 Answers   3i Infotech,


how to create a database in oracle?

3 Answers  


Can we update views in sql?

0 Answers  


Categories