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
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 |
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 |
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 |
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 |
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 |
What is the difference between cluster and non-cluster index?
Store procedure will return a value?
How many types of primary keys are there?
which tcp/ip port does sql server run on? : Sql dba
table name :Tab fields name 1.trx_no (pk) 2.trx_date 3.account code (7 char) 4.account type (1 char) 5.amt Tab contains account code day wise debit and credit transaction , account type fiels can have 2 value D for debit and c for Credit . write a query to display the account code wise total debit and credit bal for the month of april 2004. write a query to display account code wise new amt credit for the april 2004
How pl/sql source code can be protected?
What is plpgsql language?
What are different types of keys?
What is sql scripting?
What are analytic functions in sql?
What information is needed to connect sql*plus an oracle server?
Who is the owner of mysql database?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)