wood burning stoves 2.0
The moose likes JDBC and Relational Databases and the fly likes SQL Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQL Query" Watch "SQL Query" New topic

SQL Query

Premila Devi Dayalan
Ranch Hand

Joined: Jul 19, 2009
Posts: 40
I could like to write a SQL Query for SELECT data from one Database Table Example :Database Name:db_cam_eve,and table name:cam_asset location and insert the Data Into another Database,Example:Database Name:db_cam_it,with same table name as cam_asset location.

Here I just wanted to gripped the data from other Database[db_cam_eve] and put in another database[db_cam_it],which have same table name.

Is it possible.

Please advise.

[moderator edit: disabled smilies because they interfiered with content]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46397
Please tell us that the thread is about in its title.

Can't you specify the table names with database_name.table_name?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

Different databases or different schemas? If different schemas, you can specify schema_name.table_name. (assuming your user id has access to both schemas of course)

Accessing different databases is more complicated. And database specific. For example, in Oracle you can use a synonym.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Premila Devi Dayalan
Ranch Hand

Joined: Jul 19, 2009
Posts: 40
Dear Sir,

Please advise me,on these.

The Schema is, , which representing the "e" as schema_name.table_name.

What is the benefits of Using Schema sir.

I am using Pg Admin II,to run the database,and there is a "Schema" from the Drop Down Menu.The Schema in my database named "db_cam_it" is
  • "cam","jbpm" and "public".
  • .What jbpm and public start for sir.

    Please advise me sir.

    I agree. Here's the link: http://aspose.com/file-tools
    subject: SQL Query
    It's not a secret anymore!